Chapter 1 Routing Concepts

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

12/22/2017

Routing and Switching Essentials v6

Chapter 1
Routing Concepts

H.Swaih 1

Objectives
 Configure a router to route between multiple directly connected
networks
 Describe the primary functions and features of a router.
 Explain how routers use information in data packets to make
forwarding decisions in a small‐ to medium‐sized business
network.
 Explain the encapsulation and de‐encapsulation process used by
routers when switching packets between interfaces.
 Compare ways in which a router builds a routing table when
operating in a small‐ to medium‐sized business network.
 Explain routing table entries for directly connected networks.
 Explain how a router builds a routing table of directly connected
networks.
 Explain how a router builds a routing table using static routes.
 Explain how a router builds a routing table using a dynamic
routing protocol.
H.Swaih 2

1
12/22/2017

Functions of a Router
Characteristics of a Network

H.Swaih 3

Functions of a Router
Characteristics of a Network
 Physical Topology:
– Is the arrangement of the cables, network devices, and end
systems.
– It describes how the network devices are actually
interconnected with wires and cables.
 Logical Topology:
– Is the path over which the data is transferred in a network.
– It describes how the network devices appear connected to
network users.
 Speed:
– The measure of the data rate in bits per second (b/s) of a given
link.
 Cost:
– Indicates the general expense for purchasing of network
components, and installation and maintenance of the network.
H.Swaih 4

2
12/22/2017

Functions of a Router
Characteristics of a Network
 Security:
– Indicates how protected the network is, including the
information that is transmitted over the network.
 Availability:
– Is a measure of the probability that the network is available for
use when it is required.
 Scalability:
– Indicates how easily the network can accommodate more users
and data transmission requirements.
 Reliability:
– Indicates the dependability of the components that make up the
network, such as the routers, switches, PCs, and servers.
– Often measured as a probability of failure or as the mean time
between failures (MTBF).
H.Swaih 5

Functions of a Router
Why Routing?
The router is responsible for the routing of traffic between
networks.

H.Swaih 6

3
12/22/2017

Functions of a Router
Routers are Computers
 A router is a specialized computer!
– It sends packets over the data network.
 It is responsible for interconnecting networks by selecting the best
path for a packet to travel and forwarding packets to their
destination
 Regardless of their function, all router models are essentially
computers and require components to operate, (as shown in the
figure next slide):
– Operating systems (OS)
– Central processing units (CPU)
– Random‐access memory (RAM)
– Read‐only memory (ROM)
 Routers also have special memory that includes Flash and
nonvolatile random‐access memory (NVRAM).
H.Swaih 7

Functions of a Router
Routers are Computers (cont.)

H.Swaih 8

4
12/22/2017

Functions of a Router
Router Memory
Volatile /
Memory Stores
Non‐Volatile
RAM • Running IOS
• Running configuration file
Volatile
(Random Access • IP routing and ARP tables
Memory) • Packet buffer
ROM • Bootup instructions
(Read‐Only Non‐Volatile • Basic diagnostic software
Memory) • Limited IOS
NVRAM
(Non‐Volatile Non‐Volatile • Startup configuration file
RAM)
• IOS
Flash Non‐Volatile
• Other system files

H.Swaih 9

Functions of a Router
Routers are Computers
Routers use specialized ports and network interface cards to interconnect
to other networks.
Backplane of a Router
Double-wide eHWIC slots eHWIC 0 AUX LAN
port interfaces

Console
RJ45 USB
Ports
Two 4 GB flash card slots Console
USB Type B
H.Swaih 10

5
12/22/2017

Functions of a Router
Routers Interconnect Networks
 Routers can connect multiple networks.
 Routers have multiple interfaces, each on a different IP network.

Note:
WAN connection is
commonly used to
connect a LAN to the
Internet service
provider (ISP)
network.

H.Swaih 11

Functions of a Router
Routers Choose Best Paths

 The primary responsibility of a router is to direct packets by:


– Determining the best path to send packets
– Forwarding packets toward their destination
 Routers use static routes and dynamic routing protocols to
learn about remote networks and build their routing tables.
 Routing tables can be created:
– Manually with static routes
– Dynamically with routing protocols
 Routers encapsulate the packet and forward it to the interface
indicated in routing table.

H.Swaih 12

6
12/22/2017

Functions of a Router
Routers Choose Best Paths (cont.)

H.Swaih 13

Functions of a Router
Routers Choose Best Paths (cont.)
 The router uses its routing table to determine the best path to forward
the packet.
– When the router receives a packet, it examines its destination IP
address and searches for the best network address match in the
routing table.
– The routing table entries also includes the interface to be used to
forward the packet.
– Once a match is found, the router encapsulates the IP packet into
the data link frame of the outgoing or exit interface.
– The packet is then forwarded toward its destination.
 NOTE: It is possible for a router to receive a packet that is encapsulated in
one type of data link frame, and to forward the packet out of an interface
that uses a different type of data link frame. For example, a router may
receive a packet on an Ethernet interface, but must forward the packet out
of an interface configured with the Point‐to‐ Point Protocol (PPP), such as
serial interface. H.Swaih 14

7
12/22/2017

Functions of a Router Analogy: Process switching solves a


problem by doing math long hand, even
Packet Forwarding Methods if it is the identical problem.

1.Process switching Control Plane


IP Routing
Table
CPU

Ingress Interface Data Plane Egress Interface


1st Packet
2nd Packet
3rd Packet
4th Packet
5th Packet

 An older packet forwarding mechanism still available for Cisco


routers(Applies to both routers and multilayer switches.):
– When a packet arrives on an interface, it is forwarded to the
control plane where the CPU examines the routing table,
determines the exit interface and forwards the packet.
– It does this for every packet, even if the destination is the same
for a stream of packets. H.Swaih 15

Analogy: Fast switching solves a problem by


Functions of a Router doing math long hand one time and
remembering the answer for subsequent
Packet Forwarding Methods identical problems.
2.Fast Switching Control Plane
IP Routing
Table
CPU

Ingress Interface Data Plane Egress Interface


1st Packet
2nd Packet
Fast
3rd Packet
4th Packet
Forward
5th Packet Cache

 A common packet forwarding mechanism which uses a fast‐switching cache


to store next hop information. (Applies to both routers and multilayer
switches.)
– The first packet is process‐switched (CPU + routing table) but it also uses
a fast‐switching cache to store next‐hop information of the flow.
– The next packets in the flow are forwarded using the cache and without
CPU intervention. H.Swaih 16

8
12/22/2017

Functions of a Router
Analogy: CEF solves every
Packet Forwarding Methods possible problem ahead of time in a
spreadsheet.
3.Cisco Express Control Plane
Forwarding (CEF)
CPU

Ingress Interface Data Plane Egress Interface


1st Packet FIB and
2nd Packet
3rd Packet Adjacency
4th Packet
5th Packet Table

 The most recent, fastest, and Preferred Cisco IOS packet‐forwarding


mechanism for routers and multilayer switches.
– CEF copies the routing table to the Forwarding Information Base (FIB)
– CEF creates an adjacency table which contains all the layer 2 information a
router would have to consider when forwarding a packet such as Ethernet
destination MAC address.
– The adjacency table is created from the ARP table.
H.Swaih 17

Connect Devices
Connect to a Network

H.Swaih 18

9
12/22/2017

Connect Devices
Home Office Devices Connect
 Laptops and tablets connect
wirelessly to a home router.
 A network printer connects
using an Ethernet cable to the
switch port on the home router.
 The home router connects to
the service provider cable
modem using an Ethernet
cable.
 The cable modem connects to
the Internet service provider
(ISP) network.

H.Swaih 19

Connect Devices
Branch Site Devices Connect
 Corporate resources (i.e., file
servers and printers) connect to
Layer 2 switches.
 PCs and VoIP phones connect to
Layer 2 Ethernet switches.
 Laptops and smartphones
connect wirelessly to wireless
access points (WAPs).
 WAPs connect to switches.
 Layer 2 switches connect to the
edge router.
 The edge router connects to a
WAN service provider (SP) and
an ISP for backup purposes.
H.Swaih 20

10
12/22/2017

Connect Devices
Central Site Devices Connect
 PCs and VoIP phones connect to
Layer 2 Ethernet switches.
 Layer 2 switches connect to Layer
3 switches using Ethernet fiber‐
optic cables.
 Layer 3 switches connect to the
edge router.
 The corporate website server is
connected to the edge router
interface.
 The edge router connects to a
WAN SP and an ISP for backup
purposes.
H.Swaih 21

Connect Devices
Default Gateways
To enable network access devices must be configured with the following IP address
information
 IP address ‐ Identifies a unique host on a local network.
 Subnet mask ‐ Identifies the host’s network subnet.
 Default gateway ‐ Identifies the router a packet is sent to to when the
destination is not on the same local network subnet.

H.Swaih 22

11
12/22/2017

Connect Devices
Document Network Addressing
Network Documentation should include at least the following in a topology diagram
and addressing table:
 Device names
 Interfaces used in the design
 IP addresses and
subnet mask
 Default gateways

H.Swaih 23

Connect Devices
Enable IP on a Host
A host can be assigned IP address information
either:
Statically Assigned IP address – The host is
manually assigned an IP address, subnet mask and
default gateway. A DNS server IP address can also
be assigned.
– Used to identify specific network resources
such as network servers and printers.
– Can be used in very small networks with few
hosts.
Dynamically Assigned IP Address – IP Address
information is dynamically assigned by a server
using Dynamic Host Configuration Protocol (DHCP).
– Most hosts acquire their IP address
information through DHCP.
– DHCP services can be provided by Cisco
routers.
H.Swaih 24

12
12/22/2017

Connect Devices
Device LEDs
 Most network interfaces have one or two LED link indicators
next to the interface.
 Generally:
– Green LED means a good connection
– Blinking green LED indicates network activity.
– No light then there may be a problem with either the
network cable or the network itself.
 The switch port where the connection terminates would also
have an LED indicator lit.
– If one or both ends are not lit, try a different network
cable.

H.Swaih 25

Connect Devices
Device LEDs
Cisco 1941 LEDs

H.Swaih 26

13
12/22/2017

Connect Devices
Console Access Console Connection

SSH

 In a production environment, infrastructure devices are commonly


accessed remotely using Secure Shell (SSH) or HyperText Transfer
Protocol Secure (HTTPS).
 Console access is really only required when initially configuring a
device, if remote access fails, or if the change may affect the remote
access.
 Console access requires:
– Console cable – RJ‐45‐to‐DB‐9 console cable
– Terminal emulation software – Tera Term, PuTTY, HyperTerminal
H.Swaih 27

Connect Devices
USB Serial Console Connection

 The Cisco ISR G2* supports a USB serial console connection.


– To establish connectivity, a USB Type‐A to USB Type‐B (mini‐B
USB) is required, as well as an operating system device driver.
– This device driver is available from http://www.cisco.com.
 Although these routers have two console ports, only one console
port can be active at a time.
– When a cable is plugged into the USB console port, the RJ‐45
port becomes inactive.
– When the USB cable is removed from the USB port, the RJ‐45
port becomes active.

*Integrated Services Routers Generation 2 (ISR G2)


H.Swaih 28

14
12/22/2017

Connect Devices
Console Connection Requirements
Port on Terminal
Cable required Port on ISR
Computer emulation

Serial port • RJ45‐to‐DB9 console cable

• USB‐to‐RS232 compatible RJ45 Console


port Tera Term
serial port adapter
• Adapter may require a
USB software driver
Type‐A • RJ45‐to‐DB9 console cable
port • USB Type‐A to USB Type‐B
(mini‐B USB) PuTTY
USB Type‐B
• An device driver is required
(mini‐B USB)
and available from
cisco.com.
H.Swaih 29

Connect Devices
Console Connection Requirements

H.Swaih 30

15
12/22/2017

Connect Devices
Enable IP on a Switch
 Network infrastructure devices require IP addresses to enable remote
management.
 On a switch, the management IP address is assigned on a virtual interface.

31
H.Swaih

Basic Settings on a Router

32
H.Swaih

16
12/22/2017

Configure Basic Router Settings

Basics tasks that should be first configured on a Cisco


Router and Cisco Switch:
 Name the device – Distinguishes it from other routers
 Secure management access – Secures privileged EXEC,
user EXEC, and Telnet access/SSH access, console
access, and encrypts passwords to their highest level
 Configure a banner – Provides legal notification of
unauthorized access.
 Save the Configuration

H.Swaih 33

Configure Basic Router Settings


Name the Device

.2

.2

Router# configure terminal


Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname R1
R1(config)#

H.Swaih 34

17
12/22/2017

Configure Basic Router Settings


Secure Management Access

.2

.2

R1(config)# enable secret class


R1(config)# line console 0
R1(config)# password cisco
R1(config-line)# exec-timeout 0 0
R1(config-line)# logging synchronous
R1(config-line)# login
R1(config-line)# exit
R1(config-line)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config)# exit
R1(config)# service password-encryption
R1(config)#

35
H.Swaih

Configure Basic Router Settings


Configure a Banner

.2

.2

R1(config)# banner motd $ Authorized Access Only! $


R1(config)#
OR use # instead of $
R1(config)# banner motd # Authorized Access Only! #
R1(config)#

H.Swaih 36

18
12/22/2017

Configure Basic Router Settings


Save the Configuration

.2

.2

R1# copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#

H.Swaih 37

Configure Basic Settings on R2


Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname R2
R2(config)#
R2(config)# enable secret class
R2(config)# line console 0
R2(config)# password cisco
R2(config-line)# exec-timeout 0 0
R2(config-line)# logging synchronous
R2(config-line)# login
R2(config-line)# exit
R2(config-line)# line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login
R2(config)# exit
R2(config)# service password-encryption
R2(config)#
R2(config)# banner motd $ Authorized Access Only! $
R2(config)# end
R2# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R2#

H.Swaih 38

19
12/22/2017

Configure an IPv4 Router Interface


To be available, a router interface must be:
 Configured with an address and subnet mask .
 Must be activated using no shutdown command. By
default LAN and WAN interfaces are not activated.
 Serial cable end labeled DCE must be configured with
the clock rate command.
 Optional description can be included.

H.Swaih 39

Configure an IPv4 Router Interface


Configure the Gi0/0 Interface

.2

.2

R1(config)# interface gigabitethernet 0/0


R1(config-if)# description Link to LAN 1
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Jan 30 22:04:47.551: %LINK-3-UPDOWN: Interface
GigabitEthernet0/0, changed state to down
R1(config)#
*Jan 30 22:04:50.899: %LINK-3-UPDOWN: Interface
GigabitEthernet0/0, changed state to up
*Jan 30 22:04:51.899: %LINEPROTO-5-UPDOWN: Line protocol on
Interface GigabitEthernet0/0, changed state to up
R1(config)# H.Swaih 40

20
12/22/2017

Configure an IPv4 Router Interface


Configure the Gi0/1 Interface

.2

.2

R1(config)# interface gigabitethernet 0/1


R1(config-if)# description Link to LAN 2
R1(config-if)# ip address 192.168.11.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
*Jan 30 22:06:02.543: %LINK-3-UPDOWN: Interface
GigabitEthernet0/1, changed state to down
R1(config)#
*Jan 30 22:06:05.899: %LINK-3-UPDOWN: Interface
GigabitEthernet0/1, changed state to up
*Jan 30 22:06:06.899: %LINEPROTO-5-UPDOWN: Line protocol on
Interface GigabitEthernet0/1, changed state to up
R1(config)# H.Swaih 41

Configure an IPv4 Router Interface


Configure the S0/0/0 Interface

.2

.2

R1(config)# interface serial 0/0/0


R1(config-if)# description Link to R2
R1(config-if)# ip address 209.165.200.225 255.255.255.252
R1(config-if)# clockrate 128000
R1(config-if)# no shutdown
R1(config-if)# exit
*Jan 30 23:01:17.323: %LINK-3-UPDOWN: Interface
Serial0/0/0, changed state to down
R1(config)#

H.Swaih 42

21
12/22/2017

Configure the R2 Interfaces


R2(config)#interface gigabitethernet 0/0
R2(config-if)#description Link to LAN 3
R2(config-if)#ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:08:34.139: Output omitted
R2(config)#
R2(config)#interface gigabitethernet 0/1
R2(config-if)#description Link to LAN 4
R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:09:56.915: Output omitted
R2(config)#
R2(config)#interface serial 0/0/0
R2(config-if)#description Link to R1
R2(config-if)#ip address 209.165.200.226 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
*Jan 30 23:09:18.451: %LINK-3-UPDOWN: Interface Serial0/0/0, changed
state to up
*Jan 30 23:09:19.451: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Serial0/0/0, changed state to up
R2(config)# R1’s Serial 0/0/0 interface will also now be in the up state
H.Swaih 43

Configure an IPv6 Router Interface


To configure interface with IPv6 address and subnet mask:
 Use the ipv6 address ipv6‐address/prefix‐length [link‐local | eui‐
64] interface configuration command.
 Activate using the no shutdown command.
IPv6 interfaces can support more than one address:
 Configure a specified global unicast ‐ ipv6‐address / prefix‐length
 Configure a global IPv6 address with an interface identifier (ID) in
the low‐order 64 bits, using the EUI‐64 process ‐ ipv6‐address /
prefix‐length eui‐64
 Configures a static link‐local address on the interface that is used
instead of the link‐local address that is automatically configured ‐
ipv6‐address / prefix‐length link‐local
* (Extended Unique Identifier)EUI‐64 Process

H.Swaih 44

22
12/22/2017

Configure an IPv6 Router Interface


Statically Assign IPv6 Address to Host
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

H.Swaih 45

Configure an IPv6 Router Interface


Configuring IPv6 Address on Gi0/0
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1(config)# interface gigabitethernet 0/0


R1(config-if)# description Link to LAN 1
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Feb 3 21:38:37.279: %LINK-3-UPDOWN: Interface
GigabitEthernet0/0, changed state to down
*Feb 3 21:38:40.967: %LINK-3-UPDOWN: Interface
GigabitEthernet0/0, changed state to up
*Feb 3 21:38:41.967: %LINEPROTO-5-UPDOWN: Line protocol on
Interface GigabitEthernet0/0, changed state to up
R1(config)# H.Swaih 46

23
12/22/2017

Configure an IPv6 Router Interface


Configuring IPv6 Address on Gi0/1
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1(config)# interface gigabitethernet 0/1


R1(config-if)# description Link to LAN 2
R1(config-if)# ipv6 address 2001:db8:acad:2::1/64
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Feb 3 21:39:21.867: %LINK-3-UPDOWN: Interface
GigabitEthernet0/1, changed state to down
*Feb 3 21:39:24.967: %LINK-3-UPDOWN: Interface
GigabitEthernet0/1, changed state to up
*Feb 3 21:39:25.967: %LINEPROTO-5-UPDOWN: Line protocol on
Interface GigabitEthernet0/1, changed state to up
R1(config)# H.Swaih 47

Configure an IPv6 Router Interface


Configuring IPv6 Address on S0/0/0
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1(config)# interface serial 0/0/0


R1(config-if)# description Link to R2
R1(config-if)# ipv6 address 2001:db8:acad:3::1/64
R1(config-if)# clock rate 128000
R1(config-if)# no shutdown
R1(config-if)#
*Feb 3 21:39:43.307: %LINK-3-UPDOWN: Interface Serial0/0/0,
changed state to down
R1(config-if)#

H.Swaih 48

24
12/22/2017

Configure an IPv6 Router Interface


Configuring the R2 Interfaces
2001:0DB8:ACAD:0003::/64 2001:0DB8:ACAD:0004::/64
:10
G0/0
:1
:2
S0/0/0 R2
G0/1 .:10
:1

2001:0DB8:ACAD:0005::/64

R2(config)#interface gigabitethernet 0/0


R2(config-if)#description Link to LAN 3
R2(config-if)#ipv6 address 2001:db8:acad:4::1/64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface gigabitethernet 0/1
R2(config-if)#description Link to LAN 4
R2(config-if)#ipv6 address 2001:db8:acad:5::1/64
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 0/0/0
R2(config-if)#description Link to R1
R2(config-if)#ipv6 address 2001:db8:acad:3::2/64
R2(config-if)#no shutdown H.Swaih 49

Configure a Loopback Interface


A loopback interface is a logical interface that is internal to the
router:
 It is not assigned to a physical port, it is considered a software
interface that is automatically in an UP state.
 Loopback interfaces are very useful because they will never go
down, unless the entire router goes down. This helps in managing
routers because there will always be at least one active interface on
the routers, the loopback interface.
– A loopback interface is useful for testing, such as testing internal
routing processes, by emulating networks behind the router.
– It is important in the Open Shortest Path First (OSPF) routing
process.
 Multiple loopback interfaces can be enabled on a router. The IPv4
address for each loopback interface must be unique and unused by
any other interface.
H.Swaih 50

25
12/22/2017

Configure a Loopback Interface (cont.)

R1(config)#interface loopback ?
<0-2147483647> Loopback interface number
Cisco IOS Software gives you plenty of loopback interfaces
H.Swaih 51

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Show commands are used to verify operation and configuration of
interface:
 show ip interfaces brief
 show ip route
 show running‐config
Show commands are used to gather more detailed interface
information:
 show interfaces
 show ip interfaces

H.Swaih 52

26
12/22/2017

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify Summary Interface Status

.2

.2

R1# show ip interface brief


Interface IP-Address OK? Method Status
Protocol
Embedded-Service-Engine0/0 unassigned YES unset administratively down down
GigabitEthernet0/0 192.168.10.1 YES manual up up
GigabitEthernet0/1 192.168.11.1 YES manual up up
Serial0/0/0 209.165.200.225 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
R1#

H.Swaih 53

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify Routing Table

.2

.2

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

<output omitted.

Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks


C 192.168.10.0/24 is directly connected, GigabitEthernet0/0 Network Address
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0 Interface Address
192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1 Network Address
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1 Interface Address
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0 Network Address
L 209.165.200.225/32 is directly connected, Serial0/0/0 Interface Address
R1# H.Swaih 54

27
12/22/2017

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify Interface Configuration

.2

.2

R1# show running-config interface gigabitEthernet 0/0


Building configuration...

Current configuration : 128 bytes


!
interface GigabitEthernet0/0
description Link to LAN 1
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
end
H.Swaih 55
R1#

Verify Connectivity of Directly Connected Networks


Verify Interface Settings

Some of the common commands to verify the IPv6


interface configuration are:
 show ipv6 interface brief ‐ displays a summary for
each of the interfaces.
 show ipv6 interface gigabitethernet 0/0 ‐ displays the
interface status and all the IPv6 addresses for this
interface.
 show ipv6 route ‐ verifies that IPv6 networks and
specific IPv6 interface addresses have been installed in
the IPv6 routing table.

H.Swaih 56

28
12/22/2017

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify the R1 Interface Status
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1# show ipv6 interface brief


GigabitEthernet0/0 [up/up]
FE80::FE99:47FF:FE75:C3E0 Link Local Address (created automatically)
2001:DB8:ACAD:1::1 Global Unicast Address (configured)
GigabitEthernet0/1 [up/up]
FE80::FE99:47FF:FE75:C3E1 Link Local Address (created automatically)
2001:DB8:ACAD:2::1 Global Unicast Address (configured)
Serial0/0/0 [up/up]
FE80::FE99:47FF:FE75:C3E0 Link Local Address (created automatically)
2001:DB8:ACAD:3::1 Global Unicast Address (configured)
Serial0/0/1 [administratively down/down]
unassigned
R1# H.Swaih 57

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify the R1 Routing Table
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1# show ipv6 interface gigabitEthernet 0/0


GigabitEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::32F7:DFF:FEA3:DA0
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:ACAD:1::1, subnet is 2001:DB8:ACAD:1::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
FF02::1:FFA3:DA0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
R1# H.Swaih 58

29
12/22/2017

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify Routing Table
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1# show ipv6 route


IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static
<output omitted>
C 2001:DB8:ACAD:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:ACAD:1::1/128 [0/0]
via GigabitEthernet0/0, receive
C 2001:DB8:ACAD:2::/64 [0/0]
via GigabitEthernet0/1, directly connected
L 2001:DB8:ACAD:2::1/128 [0/0]
via GigabitEthernet0/1, receive
C 2001:DB8:ACAD:3::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:ACAD:3::1/128 [0/0]
via Serial0/0/0, receive
L FF00::/8 [0/0]
via Null0, receive
R1# H.Swaih 59

Verify Connectivity of Directly Connected Networks


Verify Interface Settings
Verify the R1 Interface Status
2001:0DB8:ACAD:1::/64
:10 G0/0 2001:0DB8:ACAD:3::/64
PC1
:1
:1
S0/0/0
R1
:10 :1
PC2 G0/1

2001:0DB8:ACAD:2::/64

R1# ping 2001:db8:acad:1::10


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:1::10,
timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5)
R1#

H.Swaih 60

30
12/22/2017

Verify Connectivity of Directly Connected Networks


Filter Show Command Output
Show command output can be managed using the following command and filters:
 Use the terminal length number command to specify the number of lines to be
displayed. A value of 0 (zero) prevents the router from pausing between
screens of output.
 To filter specific output of commands use the (|)pipe character after show
command. Parameters that can be used after pipe include:
– section, include, exclude, begin

H.Swaih 61

Verify Connectivity of Directly Connected Networks


Command History Feature
The command history feature temporarily stores a list of
executed commands for access:
 To recall commands press Ctrl+P or the UP Arrow.
 To return to more recent commands press Ctrl+N or the
Down Arrow.
 By default, command history is enabled and the system
captures the last 10 commands in the buffer. Use the show
history privileged EXEC command to display the buffer
contents.
 Use the terminal history size user EXEC command to
increase or decrease size of the buffer.

H.Swaih 62

31
12/22/2017

Verify Connectivity of Directly Connected Networks


Command History Feature
R1#terminal history size ?
<0-256> Size of history buffer
R1#terminal history size 200
R1#
R1#show history
show ip interface brief
show interface g0/0
show ip interface g0/1
show ip route
show ip route 209.165.200.224
show running-config interface s0/0/0
terminal history size 200
show history
R1#

H.Swaih 63

Switching Packets between Networks


Router Switching Functions

 A router makes its primary forwarding decision at Layer 3, But


also participates in Layer 1 and Layer 2 processes.
 After a router has examined the destination IP address and
consulted its routing table to make its forwarding decision,
then forward that packet out the appropriate interface
toward its destination.
 Encapsulate the Layer 3 IP packet into the data portion of a
Layer 2 data‐link frame appropriate for the exit interface.
 The Layer 2 frame will then be encoded into the Layer 1
physical signals used to represent these bits over the physical
link.

H.Swaih 64

32
12/22/2017

Switching Packets between Networks


Router Switching Functions
R1 receives the stream of bits on its interface, The bits passed up to Layer 2, and
then the R1 performs the following three major steps:
Step 1: De‐encapsulates the Layer 3 packet by removing the Layer 2 frame header
and trailer.
Step 2: Examines the destination IP address of the IP packet to find the best path
in the routing table.
Step 3: If the router
finds a path to the
destination, it Encapsulating and De‐Encapsulating Packets
encapsulates the
Layer 3 packet into a
new Layer 2 frame
and forwards the
frame out the exit
interface.

H.Swaih 65

Switching Packets between Networks


Remember: Encapsulation

These addresses
do not change!

These change from Layer 3 IP Packet


host to router, router to Destination IP Source IP Other IP Data
router, and router to Address Address fields
host.
Layer 2 Data Link Frame
Destination Source Type Data Trailer
Address Address

Current Data Link


Address of Host or
Next hop Data
Router’s exit interface
Link Address of
Host or Router’s
interface

 Example , as shown in the next slides

H.Swaih 66

33
12/22/2017

Switching Packets between Networks


Send a Packet

Note: The "Type" field in Ethernet II frames tells the OS what kind of data the
frame carries – 0x0800, which means that the frame has an IPv4 packet
H.Swaih 67

Switching Packets between Networks


Forward to the Next Hop

H.Swaih 68

34
12/22/2017

Switching Packets between Networks


Packet Routing

H.Swaih 69

Switching Packets between Networks


Reach the Destination

H.Swaih 70

35
12/22/2017

Path Determination
Routing Decisions

H.Swaih 71

Path Determination
Best Path
Best path is selected by a routing protocol based on the value or
metric it uses to determine the distance to reach a network:
 A metric is the value used to measure the distance to a given
network.
 Best path to a network is the path with the lowest metric.
Dynamic routing protocols use their own rules and metrics to build
and update routing tables:
 Routing Information Protocol (RIP) ‐ Hop count
 Open Shortest Path First (OSPF) ‐ Cost based on cumulative
bandwidth from source to destination
 Enhanced Interior Gateway Routing Protocol (EIGRP) ‐ Bandwidth,
delay, load, reliability
H.Swaih 72

36
12/22/2017

Path Determination
Best Path Which path is
Best Path
my “best path”?

RIP’s metric is hop count


OSPF’s metric is bandwidth ?
EIGRP is bandwidth + delay

 Comparing Dynamic Routing Protocols: RIP and OSPF:


– RIP uses hop count
R1 to R3
Fewer links but much slower
– OSPF uses bandwidth
R1 to R2 to R3
More routers but much faster links
H.Swaih 73

Path Determination
Load Balancing To reach the 192.168.1.0/24
network it is 2 hops via R2 and 2
hops via R4.
When a router has two or
?
more paths to a destination
with equal cost metrics, then
the Router will perform equal‐ ?
cost load balancing and
forwards the packets using
192.168.1.0/24
both paths equally;
 Equal cost load balancing can improve network performance.
 Equal cost load balancing can be configured to use both
dynamic routing protocols and static routes.
 All routing protocols (RIP, EIGRP, OSPF) support equal cost
load balancing.
 Only EIGRP supports unequal cost load balancing.
H.Swaih 74

37
12/22/2017

Path Determination of the route


Administrative Distance
If multiple paths to a destination are configured on a router, the path installed in the
routing table is the one with the lowest Administrative Distance (AD) (The AD represents
the “trustworthiness” of the route):
 A static route with an AD of 1 is more reliable than an EIGRP‐discovered route with
an AD of 90.
 A directly connected route with an AD of 0 is more reliable than a static route with an
AD of 1.
AD is a number between 0 and 255. If the administrative distance is 255, the router does
not believe the source of that route and does not install that route into the routing table.

H.Swaih 75

The Routing Table


The Routing Table
A routing table is a file stored in RAM that contains information about:
 Directly connected routes: These routes come from the active router
interfaces.
 Remote routes: These are remote networks connected to other routers.
 Network or next hop associations

H.Swaih 76

38
12/22/2017

The Routing Table


Routing Table Sources

The show ip route and show ipv6 route commands are used to
display the contents of the routing table:
 Local route interfaces ‐ Added to the routing table when an
interface is configured. (displayed in IOS 15 or newer)
 Directly connected interfaces ‐ Added to the routing table
when an interface is configured and active.
 Static routes ‐ Added when a route is manually configured
and the exit interface is active.
 Dynamic routing protocol ‐ Added when EIGRP or OSPF are
implemented and networks are identified.

H.Swaih 77

The Routing Table


Routing Table Sources
The sources of the routing table entries are identified by a code.
The code identifies how the route was learned. For instance,
common codes include
 L: Identifies the address assigned to a router’s interface. This
allows the router to efficiently determine when it receives a
packet for the interface instead of being forwarded.
 C: Identifies a directly connected network.
 S: Identifies a static route created to reach a specific network.
 D: Identifies a dynamically learned network from another router
using EIGRP.
 O: Identifies a dynamically learned network from another router
using the OSPF routing protocol.

H.Swaih 78

39
12/22/2017

The Routing Table


Routing Table Sources

H.Swaih 79

The Routing Table


Remote Network Routing Entries
Interpreting the entries in the routing table.

H.Swaih 80

40
12/22/2017

Directly Connected Routes


Directly Connected Interfaces
A newly deployed router, without any configured interfaces, has an
empty routing table. An active, configured, directly connected
interface creates two routing table entries:
• Link Local (L)
• Directly Connected (C)

H.Swaih 81

Directly Connected Routes


Directly Connected Example

A routing table
with the directly
connected
interfaces of R1
configured and
activated.

H.Swaih 82

41
12/22/2017

Directly Connected Routes


Directly Connected IPv6 Example
The show ipv6 route command shows the ipv6 networks and
routes installed in the routing table.

H.Swaih 83

Statically Learned Routes


Static Routes
Static routes and default static routes can be implemented after
directly connected interfaces are added to the routing table:
 Static routes are manually configured
 They define an explicit path between two networking devices.
 Static routes must be manually updated if the topology changes.
 Their benefits include improved security and control of resources.
 Configure a static route to a specific network using the ip route
network mask {next‐hop‐ip | exit‐intf} command.
 A default static route is used when the routing table does not
contain a path for a destination network.
 Configure a default static route using the ip route 0.0.0.0
0.0.0.0 {exit‐intf | next‐hop‐ip} command.
 Covered more in Chapter2
H.Swaih 84

42
12/22/2017

Statically Learned Routes


Static Routes Example

H.Swaih 85

Statically Learned Routes


Default Static Routes Example

H.Swaih 86

43
12/22/2017

Statically Learned Routes


Static IPv6 Routes Example

H.Swaih 87

Statically Learned Routes


Static IPv6 Routes Example

H.Swaih 88

44
12/22/2017

Dynamic Routing Protocols


Dynamic Routing
Dynamic routing is used by routers to share information about the reachability
and status of remote networks. It performs network discovery and maintains
routing tables.
*Dynamic Routing will be covered more in Chapters 3 and later.

H.Swaih 89

Dynamic Routing Protocols


IPv4 Routing Protocols
Cisco Integrated Services Routers (ISR) routers can support a
variety of dynamic IPv4 routing protocols including:
 EIGRP – Enhanced Interior Gateway Routing Protocol
 OSPF – Open Shortest Path First
 IS‐IS – Intermediate System‐to‐Intermediate System
 RIP – Routing Information Protocol

H.Swaih 90

45
12/22/2017

Dynamic Routing Protocols


IPv4 Routing Protocols

H.Swaih 91

Dynamic Routing Protocols


IPv6 Routing Protocols

Cisco ISR routers can support a variety of dynamic IPv6 routing


protocols including:
 RIPng ‐ RIP next generation
 OSPFv3
 EIGRP for IPv6
 MP‐BGP4 ‐ Multicast Protocol‐Border Gateway Protocol

H.Swaih 92

46
12/22/2017

Dynamic Routing Protocols


IPv6 Routing Protocols

H.Swaih 93

Chapter 1: Summary
 There are many key structures and performance‐related
characteristics referred to when discussing networks:
topology, speed, cost, security, availability, scalability, and
reliability.
 Cisco routers and Cisco switches have many similarities. They
support a similar modal operating system, similar command
structures, and many of the same commands.
 One distinguishing feature between switches and routers is
the type of interfaces supported by each.
 The main purpose of a router is to connect multiple networks
and forward packets from one network to the next. This
means that a router typically has multiple interfaces. Each
interface is a member or host on a different IP network.

H.Swaih 94

47
12/22/2017

Chapter 1: Summary (cont.)


 The routing table is a list of networks known by the router.
 A remote network is a network that can only be reached by
forwarding the packet to another router.
 Remote networks are added to the routing table in two ways:
either by the network administrator manually configuring
static routes or by implementing a dynamic routing protocol.
 Static routes do not have as much overhead as dynamic
routing protocols; however, static routes can require more
maintenance if the topology is constantly changing or is
unstable.
 Dynamic routing protocols automatically adjust to changes
without any intervention from the network administrator.
Dynamic routing protocols require more CPU processing and
also use a certain amount of link capacity for routing updates
and messages. H.Swaih 95

Chapter 1: Summary (cont.)

 Routers make their primary forwarding decision at Layer 3,


the Network layer. However, router interfaces participate in
Layers 1, 2, and 3. Layer 3 IP packets are encapsulated into a
Layer 2 data link frame and encoded into bits at Layer 1.
 Router interfaces participate in Layer 2 processes associated
with their encapsulation. For example, an Ethernet interface
on a router participates in the ARP process like other hosts
on that LAN.
 Components of the IPv6 routing table are very similar to the
IPv4 routing table. For instance, it is populated using directly
connected interfaces, static routes and dynamically learned
routes.

H.Swaih 96

48

You might also like