Network Layer: Introduction To Networks

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 52

Chapter 6:

Network Layer

Introduction to Networks

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
Chapter 6: Objectives
In this chapter, you will be able to:
 Explain how network layer protocols and services support
communications across data networks.
 Explain how routers enable end-to-end connectivity in a small-to-
medium-sized business network.
 Determine the appropriate device to route traffic in a small-to-
medium-sized business network.
 Configure a router with basic configurations.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2
Chapter 6
6.1 Network Layer Protocols
6.2 Routing
6.3 Routers
6.4 Configuring a Cisco Router
6.5 Summary

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3
6.1 Network Layer Protocols

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4
Network Layer in Communication
The Network Layer
The network layer, or OSI Layer 3, provides services to allow end devices to
exchange data across the network. To accomplish this end-to-end transport,
the network layer uses four basic processes:
 Addressing end devices
 Encapsulation
 Routing
 De-encapsulating

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5
Network Layer in Communication
Network Layer Protocols
Common network layer protocols include:
 IP version 4 (IPv4)
 IP version 6 (IPv6)
Legacy network layer protocols include:
 Novell Internetwork Packet Exchange (IPX)
 AppleTalk
 Connectionless Network Service (CLNS/DECNet)

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6
IP Characteristics
IP Components

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7
Characteristics of the IP protocol
IP - Connectionless

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8
Characteristics of the IP protocol
Best Effort Delivery

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9
Characteristics of the IP protocol
IP – Media Independent

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10
IPv4 Packet
Encapsulating IP

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11
IPv4 Packet
IPv4 Packet Header
Contents of the IPv4 packet header

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12
Network Layer in Communication
Limitations of IPv4
 IP Address depletion
 Internet routing table expansion:
Number of servers and routers connected the internet increase, causing a
large routing table consuming a great deal of memory and resources.
 Lack of end-to-end connectivity:
Due to the use of NAT technology which will hide the internal host. This
will cause a problem to end-to-end connectivity technology and
applications.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13
Network Layer in Communication
Introducing IPv6
 Increased address space
 Improved packet handling
 Eliminates the need for NAT
 Integrated security
 4 billion IPv4 addresses
4,000,000,000
 340 undecillion IPv6 addresses
340,000,000,000,000,000,000,000,000,000,000,000,000

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14
IPv6 Packet
Encapsulating IPv6

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15
IPv6 Packet
IPv6 Packet Header
Byte 1 Byte 2 Byte 3 Byte 4

Version Traffic Class Flow Label

Next
Payload Length Hop Limit
Header

Source IP Address

Destination IP Address

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16
6.2 Routing

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17
Host Routing Tables
Host Packet Forwarding Decision

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18
Host Routing Tables
Default Gateway
Hosts must maintain their own, local, routing table to ensure that
network layer packets are directed to the correct destination network.
The local table of the host typically contains:
 Direct connection
 Local network route
R
 Local default route

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19
Host Routing Tables
IPv4 Host Routing Table

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20
Router Routing Tables
Router Packet Forwarding Decision

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21
Router Routing Tables
IPv4 Router Routing Table
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 .1 209.165.200.224 /30
.1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1#

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22
Router Routing Tables
Directly Connected Routing Table Entries

192.168.10.0/24 64.100.0.1 10.1.1.0/24


.10 G0/0 .10
PC1 .1 209.165.200.224 /30
.1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

A B C
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0

A Identifies how the network was learned by the router.


B Identifies the destination network and how it is connected.
C Identifies the interface on the router connected to the destination network.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23
Router Routing Tables
Remote Network Routing Table Entries
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 .1 209.165.200.224 /30
.1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0

A Identifies how the network was learned by the router.


B Identifies the destination network.
C Identifies the administrative distance (trustworthiness) of the route source.
D Identifies the metric to reach the remote network.
E Identifies the next hop IP address to reach the remote network.
F Identifies the amount of elapsed time since the network was discovered.
G Identifies the outgoing interface on the router to reach the destination network.
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24
Router Routing Tables
Next-Hop Address
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 .1
209.165.200.224 /30
.1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1#

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25
6.3 Routers

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26
Anatomy of a Router
Router Memory

Volatile /
Memory Stores
Non-Volatile

• Running IOS
• Running configuration file
RAM Volatile
• IP routing and ARP tables
• Packet buffer

• Bootup instructions
ROM Non-Volatile • Basic diagnostic software
• Limited IOS

NVRAM Non-Volatile • Startup configuration file

• IOS
Flash Non-Volatile
• Other system files

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27
Anatomy of a Router
Connecting to a Router

WAN AUX LAN


Interface Port Interfaces

Console
RJ45

Console
USB Type B

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28
Anatomy of a Router
LAN and WAN Interfaces

Serial Interfaces

LAN Interfaces

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29
Router Boot-up
Cisco IOS
The Cisco IOS operational details vary on different internetworking devices,
depending on the device’s purpose and feature set. However, Cisco IOS for
routers provides the following:
 Addressing
 Interfaces
 Routing
 Security
 QoS
 Resources Management

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30
Router Boot-up
Bootset Files

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31
Introduction to Routing

• Store-and-forward packet switching »


• Connectionless service – datagrams »
• Connection-oriented service – virtual circuits »
• Comparison of virtual-circuits and datagrams »

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32
What is Circuit Switching?
 One of the switching technologies used to send messages
from one point to another using a dedicated point-to-point link
throughout the session.
 They are mainly used in PSTN (Public Switched Telephone
Network) where the caller and receiver exchange information
on a dedicated channel using an end-to-end link.
 This is a connection oriented channel which is established
between the sender and the receiver using a dedicated
signaling protocol. When either of them disconnects the call,
the circuit breaks thereby terminating the session

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33
What is Packet Switching?
 Packet switching makes the most out of the network
bandwidth by breaking the message into small units called
data packets which seek the most efficient routing path to
reach its destination.
 Each data packet is assigned a header containing signaling
information including the sender and receiver address, and
then transmitted individually through the network.
 Each data packet may take a different route as addressed by
its associated header.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34
What is Packet Switching?
 The data is processed at all intermediate nodes located at
various points before reaching its destination where all the
packets are reassembled and recompiled into the original
message.
 It’s a more robust and efficient method to transmit data that
can withstand some delays during the session. It’s mainly
used for data and voice communication.
 Known as Datagram networks

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35
Environment of the network layer protocols

ISP’s equipment

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 36
Store-and-Forward Packet Switching

• A host with a packet to send transmits it to the nearest


router, either on its own LAN or over a point-to-point link
to the carrier.
• The packet is stored there until it has fully arrived so the
checksum can be verified. Then it is forwarded to the
next router along the path until it reaches the destination
host, where it is delivered. (store-and-forward packet
switching

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 37
Services Provided to the Transport Layer
1. The services should be independent of the router
technology.
2. The transport layer should be shielded from the number,
type, and topology of the routers present.
3. The network addresses made available to the transport
layer should use a uniform numbering plan, even across
LANs and WANs.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 38
Service Types
 connectionless service  packets are injected into the
subnet individually and routed independently of each other.
No advance setup is needed. In this context, the packets are
frequently called datagrams, and the subnet is called a
datagram subnet.

 connection-oriented service  a path from the source


router to the destination router must be established before
any data packets can be sent. This connection is called a VC
(virtual circuit), in analogy with the physical circuits set up
by the telephone system, and the subnet is called a virtual-
circuit subnet.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 39
Connectionless Service – Datagrams
 Packet is forwarded using destination address inside it
Different packets may take different paths

ISP’s equipment

A’s table (initially) A’s table (later) C’s Table E’s Table

Dest. Line

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 40
Connection-Oriented – Virtual Circuits
 Packet is forwarded along a virtual circuit using tag inside it
Virtual circuit (VC) is set up ahead of time

ISP’s equipment

A’s table C’s Table E’s Table

In: Line Tag Line Tag: Out

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 41
Comparison of Virtual-Circuits & Datagrams

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 42
Routing Algorithms

 Routing: making the decision which routes to use.


 Forwarding :what happens when a packet arrives.
 One can think of a router as having two processes inside
it. one of them handles each packet as it arrives, looking
up the outgoing line to use for it in the routing tables. This
process is forwarding. The other process is responsible
for filling in and updating the routing tables. That is where
the routing algorithm comes into play.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43
Routing Algorithms
• The main function of the network layer is routing packets
from the source machine to the destination machine.
• The routing algorithm is that part of the network layer
software responsible for deciding which output line an
incoming packet should be transmitted on.
• If the subnet uses datagrams internally, routing decision
must be made anew for every arriving data packet since
the best route may have changed since last time.
• If the subnet uses virtual circuits internally, routing
decisions are made only when a new virtual circuit is
being set up. Thereafter, data packets just follow the
previously-established route.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 44
Routing Algorithms Categories:

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 45
Properties of desirable routing algorithms
• Correctness: should get packets eventually to the correct destination
• Simplicity: this usually implies faster
• Robustness: should be able to handle new routers coming online, as
well as, handle other going off or malfunctioning
• Stability: under constant conditions should converge to some balane
level .
• Fairness and Optimality: these are hard to satisfy at the same time.
For example, in the situation below it might occur that to optimize flow we
would not allow traffic between X and X´, a situation which is not fair.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 46
Dynamic Routing Principles:
Optimality principle »
Shortest path algorithm »
Flooding »
Distance vector routing »
Link state routing »
Hierarchical routing »
Broadcast routing »
Multicast routing »
Anycast routing »
Routing for mobile hosts »
Routing in ad hoc networks »

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 47
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 48
Network Layer
Summary
In this chapter, you learned:
 The network layer, or OSI Layer 3, provides services to allow end devices
to exchange data across the network.
 The network layer uses four basic processes: IP addressing for end
devices, encapsulation, routing, and de-encapsulation.
 The Internet is largely based on IPv4, which is still the most widely-used
network layer protocol.
 An IPv4 packet contains the IP header and the payload.
 The IPv6 simplified header offers several advantages over IPv4, including
better routing efficiency, simplified extension headers, and capability for
per-flow processing.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 49
Network Layer
Summary (cont.)
 In addition to hierarchical addressing, the network layer is also
responsible for routing.
 Hosts require a local routing table to ensure that packets are directed to
the correct destination network.
 The local default route is the route to the default gateway.
 The default gateway is the IP address of a router interface connected to
the local network.
 When a router, such as the default gateway, receives a packet, it
examines the destination IP address to determine the destination
network.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 50
Network Layer
Summary (cont.)
 The routing table of a router stores information about directly-connected
routes and remote routes to IP networks. If the router has an entry in its
routing table for the destination network, the router forwards the packet. If
no routing entry exists, the router may forward the packet to its own
default route, if one is configured or it will drop the packet.
 Routing table entries can be configured manually on each router to
provide static routing or the routers may communicate route information
dynamically between each other using a routing protocol.
 For routers to be reachable, the router interface must be configured.

Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 51
Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 52

You might also like