0% found this document useful (0 votes)
64 views

Cis82 7 RoutingDynamically

The document discusses the operation of dynamic routing protocols, explaining that routers use routing protocols to exchange information and dynamically learn about remote networks, with the routing protocol updating its routing tables and sending messages to advertise changes in the network topology. Dynamic routing protocols automatically adapt to topology changes by rerouting traffic through alternative paths if the current path is unavailable.

Uploaded by

TeguhPratika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Cis82 7 RoutingDynamically

The document discusses the operation of dynamic routing protocols, explaining that routers use routing protocols to exchange information and dynamically learn about remote networks, with the routing protocol updating its routing tables and sending messages to advertise changes in the network topology. Dynamic routing protocols automatically adapt to topology changes by rerouting traffic through alternative paths if the current path is unavailable.

Uploaded by

TeguhPratika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 211

Chapter 3

Routing Dynamically

Routing Protocols - CCNA version 5


CIS 82 Routing Protocols and Concepts
Rick Graziani
Cabrillo College
[email protected]

Spring 2014
Chapter 3

⚫ 3.1 Dynamic Routing Protocols


⚫ 3.2 Distance Vector Dynamic Routing
⚫ 3.3 RIP and RIPng Routing
⚫ 3.4 Link-State Dynamic Routing
⚫ 3.5 The Routing Table
⚫ 3.6 Summary

2
Chapter 3: Objectives
⚫ Explain the basic operation of dynamic routing protocols.
⚫ Compare and contrast dynamic and static routing.
⚫ Determine which networks are available during an initial network
discovery phase.
⚫ Define the different categories of routing protocols.
⚫ Describe the process by which distance vector routing protocols
learn about other networks.
⚫ Identify the types of distance-vector routing protocols.
⚫ Configure the RIP routing protocol.
⚫ Configure the RIPng routing protocol.
⚫ Explain the process by which link-state routing protocols learn about
other networks.

3
Dynamic Routing Protocols
Evolution of Dynamic Routing Protocols
Routing Protocols Classification

⚫ Dynamic routing protocols used in networks since the late 1980s.


⚫ Newer versions support the communication based on IPv6.

5
Evolution of Dynamic Routing Protocols

Classful Routing Protocols Classless Routing Protocols

OSPFv2 BGP-MP &


RIPv2 RIPng OSPFv3
EGP IGRP RIPv1 IS-IS EIGRP BGP IS-ISv6

6
Purpose of Dynamic Routing Protocols
Dynamic Routing Protocol

Add dynamic routing


protocol…
No changes!

⚫ Routing protocols are used to facilitate the exchange of routing


information between routers.
⚫ The purpose of dynamic routing protocols includes:
 Discovery of remote networks
 Maintaining up-to-date routing information
 Choosing the best path to destination networks
7
 Ability to find a new best path if the current path is no longer available
Main Components of Routing Protocols

Data Structures EIGRP creates and EIGRP creates and


maintains the: maintains the:
• Routing protocols create and • Neighbor table • Neighbor table
maintain tables (databases) in RAM • Topology table • Topology table
for its operations. • Submits best path(s) to • Submits best path(s) to
the Routing table the Routing table

Routing Protocol Messages

• Routing protocols use messages to EIGRP Hello


learn and maintain accurate EIGRP Update
information about the network. EIGRP Query
• Specifically, messages are used to EIGRP Reply
discover neighboring routers, EIGRP Acknowledge
exchange routing information, and
other tasks.

Algorithm

• Routing protocols use algorithms to I will use the EIGRP I will use the EIGRP
determine the best path to various DUAL algorithm to DUAL algorithm to
destinations. identify what the best identify what the best
routes are. routes are.

8
Dynamic versus Static Routing
Using Static Routing
R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.2

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.1

⚫ Static routing has several primary uses:


 Best for smaller networks that are not expected to grow
significantly.
 Routing to and from a stub network.
 A default route.
 Networks typically use a combination of both static and dynamic
routing. 10
Static Routing Scorecard
Advantages Disadvantages

• Suitable only for simple topologies or for


• Easy to implement in a small network. special purposes such as a default static
route.

• Very secure.
• Configuration complexity increases
• No advertisements are sent as compared to
dramatically as network grows.
dynamic routing protocols.

• Route to destination is always the same. • Manual intervention required to re-route traffic.

• No routing algorithm or update mechanism


required therefore extra resources (CPU or
RAM) are not required.

11
Dynamic Routing Scenario

Dynamic routing is the best choice for large networks. 12


Reaching Remote Networks Dynamically
Hey I’m R1 and I’m using EIGRP to let my
neighbors know that I’m directly connected
to networks:
•192.168.10.0/24
•192.168.11.0/24
•209.165.200.224/30

Internet

Hey I’m R2 and I’m using EIGRP to let my neighbors


know that I’m the gateway to the Internet and that I’m
directly connected to:
•10.1.1.0/24
•10.1.2.0/24
•209.165.200.224/30

13
Static Routing Scorecard
Advantages Disadvantages

• Suitable in all topologies where multiple


• Can more complex to implement.
routers are required.

• Less secure.
• Generally independent of the network size. • Additional configuration settings are required
to secure.

• Automatically adapts topology to reroute


• Route depends on the current topology.
traffic if possible.

• Requires additional CPU, RAM, and link


bandwidth.

14
Static Routing Versus Dynamic Routing
Dynamic Routing Static Routing
Configuration Generally independent of the
Increases with network size
Complexity network size

Topology Automatically adapts to topology


Administration intervention required
Changes changes

Suitable for simple and complex


Scaling Suitable for simple topologies
topologies

Security Less secure More secure

Resource Uses CPU, memory, and link


No extra resources required
Usage bandwidth

Route depends on the current Route to destination is always the


Predictability
topology same

15
Routing Protocol Operation
Dynamic Routing Protocol Operation

Update
Update

Update Update

Update Update

⚫ In general, the operations of a dynamic routing protocol can be described


as follows:
 The router sends and receives routing messages on its interfaces.
 The router shares routing messages and routing information with
other routers that are using the same routing protocol.
 Routers exchange routing information to learn about remote
networks.
 When a router detects a topology change the routing protocol can
advertise this change to other routers. 17
Cold Start
▪ When a router powers up, it knows nothing about the network topology.
▪ After it boots successfully, it applies the saved startup-config from
NVRAM (if there is one).
▪ The router initially discovers its own directly connected networks.

18
Note: Routers running RIPv2
Discover Directly Attached Networks
⚫ R1 adds the 10.1.0.0 network available through interface
FastEthernet 0/0 and 10.2.0.0 is available through interface Serial
0/0/0.
⚫ R2 adds the 10.2.0.0 network available through interface Serial
0/0/0 and 10.3.0.0 is available through interface Serial 0/0/1.
⚫ R3 adds the 10.3.0.0 network available through interface Serial
0/0/1 and 10.4.0.0 is available through interface FastEthernet 0/0.

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

19
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Network Discovery – Initial Exchange


⚫ R1 sends an update about network 10.1.0.0 out the Serial0/0/0 interface
and sends an update about network 10.2.0.0 out of Fa0/0.
⚫ R2 sends an update about network 10.3.0.0 out of Serial 0/0/0 and sends
an update about network 10.2.0.0 out of Serial 0/0/1.
⚫ R3 sends an update about network 10.4.0.0 out of Serial 0/0/1 and sends
an update about network 10.3.0.0 out of FastEthernet0/0.

10.2.0.0 10.1.0.0 10.3.0.0 10.2.0.0 10.4.0.0 10.3.0.0

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

Distance vector routing protocols implement a routing loop prevention technique known as split horizon.
Split horizon prevents information from being sent out the same interface from which it was received.
For example, R2 does not send an update containing the network 10.1.0.0 out of Serial 0/0/0, because R2 learned
about network 10.1.0.0 through Serial 0/0/0. 20
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Update Routing Table


⚫ R1 receives the update from R2 about network 10.3.0.0, increments the hop
count by 1, and stores the network in the routing table (metric of 1).
⚫ R2 receives the update from R1 about network 10.1.0.0 and R3 about
network 10.4.0.0, increments and stores both networks in the routing table
(metric of 1).
⚫ R3 receives the update from R2 about network 10.2.0.0, increments the hop
count by 1, and stores the network in the routing table (metric of 1).

10.2.0.0 10.1.0.0 10.3.0.0 10.2.0.0 10.4.0.0 10.3.0.0

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/1 1

21
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Network Discovery – Next Exchange


⚫ R1 sends an update about 10.1.0.0 out Serial0/0/0 and networks 10.2.0.0 metric 1)
and 10.3.0.0 out of Fa0/0.
⚫ R2 sends an update about 10.3.0.0 and 10.4.0.0 (metric 1) out Serial 0/0/0 and
network 10.2.0.0 and 10.1.0.0 (metric 1) out of Serial 0/0/1.
⚫ R3 sends an update about 10.4.0.0 out Serial 0/0/1 and networks 10.2.0.0 (metric
1) and 10.3.0.0 out FastEthernet0/0.

10.2.0.0(1), 10.3.0.0 10.1.0.0 10.3.0.0, 10.4.0.0 (1) 10.2.0.0, 10.1.0.0(1) 10.4.0.0 10.3.0.0, 10.2.0.0(1)

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/1 1

22
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Update Routing Table


⚫ R1 receives the update from R2 about network 10.3.0.0 and 10.4.0.0 (1).
 Refreshes the information for 10.3.0.0.
 It increments the 10.4.0.0 hop count by 1 and stores it in the routing table
(metric 2).
 10.4.0.0 is 1 hop for R2, so 2 hops for R1

10.2.0.0(1), 10.3.0.0 10.1.0.0 10.3.0.0, 10.4.0.0 (1) 10.2.0.0, 10.1.0.0(1) 10.4.0.0 10.3.0.0, 10.2.0.0(1)

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1

23
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Update Routing Table


⚫ R2 receives the update from R1 about network 10.1.0.0 and from R3 about
network 10.4.0.0 and refreshes the routing table.
⚫ No changes to routing table because it didn’t learn any new routes or of a
better route to any networks.

10.2.0.0(1), 10.3.0.0 10.1.0.0 10.3.0.0, 10.4.0.0 (1) 10.2.0.0, 10.1.0.0(1) 10.4.0.0 10.3.0.0, 10.2.0.0(1)

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1

24
This example is only for distance vector routing protocols (not link state routing protocols).
More later!

Update Routing Table


▪ R3 receives the update from R2 about network 10.1.0.0 (1) and 10.2.0.0.
 Refreshes the information for 10.2.0.0.
 It increments the 10.1.0.0 hop count by 1 and stores it in the routing table
(metric 2).
 10.1.0.0 is 1 hop for R2 so 2 hops or R3

Network Has Converged

10.2.0.0(1), 10.3.0.0 10.1.0.0 10.3.0.0, 10.4.0.0 (1) 10.2.0.0, 10.1.0.0(1) 10.4.0.0 10.3.0.0, 10.2.0.0(1)

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1 R 10.1.0.0 S0/0/1 2

25
Split Horizon
10.3.0.0, 10.4.0.0
X
Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1 R 10.1.0.0 S0/0/1 2

⚫ Split horizon rule says that a router should not advertise a network through
the interface from which the update came.
 Helps prevent routing loops caused by slow convergence.

26
Split Horizon – Route Poisoning
10.1.0.0 = 16 hops

X
Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1 R 10.1.0.0 S0/0/1 2

⚫ Route poisoning is used to mark the route as unreachable in a routing


update that is sent to other routers.
 Unreachable is interpreted as a metric that is set to the maximum.
 For RIP, a poisoned route has a metric of 16.
⚫ Route poisoning speeds the convergence process.

27
Split Horizon with Poison Reverse
10.3.0.0 = 16, 10.4.0.0 = 16

Network Interface Hop Network Interface Hop Network Interface Hop

C 10.1.0.0 Fa0/0 0 C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0

C 10.2.0.0 S0/0/0 0 C 10.3.0.0 S0/0/1 0 C 10.4.0.0 Fa0/0 0

R 10.3.0.0 S0/0/0 1 R 10.1.0.0 S0/0/0 1 R 10.2.0.0 S0/0/1 1

R 10.4.0.0 S0/0/0 2 R 10.4.0.0 S0/0/1 1 R 10.1.0.0 S0/0/1 2

⚫ Split horizon with poison reverse


⚫ The concept of split horizon with poison reverse is that explicitly telling a
router to ignore a route is better than not telling it about the route in the first
place.

28
Network Discovery - Convergence
⚫ Convergence is when a network has complete and accurate information
about the entire network
⚫ Convergence time is the time it takes routers to share information,
calculate best paths, and update their routing tables.
⚫ NOTE:
 A network is not completely operable until the network has converged.

29
Routing Protocol Classification
Classifying Routing Protocols

Dynamic Routing Protocols

Purpose Interior Gateway Protocols Exterior Gateway Protocols


(IGP) (EGP)

Distance Vector Link-State Path-Vector


Operation Routing Protocols Routing Protocols Routing Protocol

RIPv1 IGRP Classful


Behaviour
RIPv2 EIGRP OSPF IS-IS BGP Classless

RIPv1 and IGRP are legacy Link-state routing


protocols that have evolved protocols are classless
into the classless routing by nature.
protocols, RIPv2 and EIGRP.
31
IGP and EGP CENIC BGP PAIX Palo Alto

Cabrillo
College

⚫ An autonomous system (AS)— is a collection of routers under a common


administration.
 Company’s internal network
 An ISP’s network.
⚫ Because the Internet is based on the autonomous system concept, two types of
routing protocols are required:
 Interior Gateway Protocols IGP (RIP, EIGRP, OSPF, IS-IS): Within Cabrillo
College & within CENIC
 Routing inside an autonomous system
 Exterior Gateway Protocols (BGP): Between ISPs, CENIC and PAIX, and
some customers (usually just say BGP).
 Routing between autonomous systems 32
IGP versus EGP Routing Protocols
⚫ IGPs are used by organizations and within service provider’s
network. ISP with customers
ISP with customers
BGP
ISP-1 AS-2
IS-IS OSPF

AS-1

BGP
EIGRP
Static Route
ISP-2 AS-3
OSPF IS-IS
Default Static Route

Single customer
▪ BGP could be used to interconnect large organizations to service
providers and in between various service providers.
▪ Smaller organizations would typically connect using static routes but
could also use BGP.

33
Routing Protocol Operation

Distance Vector and Link-state


Distance Vector Routing
Protocol Operation
⚫ What does a street sign like this tell
you?
 How far (distance)
 Which way (direction)
⚫ Distance vector
 Routes are advertised as vectors
of distance and direction.
⚫ Distance is defined in terms of a
metric
 Such as hop count
⚫ Direction is simply the:
 Nexthop router or
 Exit interface
⚫ Typically use the Bellman-Ford
algorithm for the best-path (shortest) 35
route determination
Distance Vector Routing
Protocol Operation
⚫ Routing protocol
 Does not know the topology of an
internetwork.
 Only knows the routing information
received from its neighbors.
 Does not know if another path
would actually be faster.

Would another path I don’t have a map of


that is longer actually the network.
be faster? (speed
limit)
All I know is how far
and which direction
(to next hop router)

Distance Vector routing protocols are like signposts along the path to the final destination. 36
Distance Vector Concepts

37
Distance Vector
Routing Protocols

▪ Routing Information Protocol (RIP)


 Thee versions: IPv4 RIPv1 and RIPv2. RIPng for
IPv6. NOTE:
 Uses hop counts as its metric. •EIGRP is an
“advanced” DV
▪ Interior Gateway Routing Protocol (IGRP) protocol.
 Legacy Cisco Proprietary protocol. •When we discuss
 Uses bandwidth and delay as its metric. DV protocols in
general terms, we
▪ Enhanced IGRP (EIGRP)
are referring more to
 Cisco Proprietary protocol. RIP than EIGRP.
 Uses bandwidth and delay as its metric.
 Only event driven distance-vector routing
38
protocol.
Link-State Protocol Operation
⚫ Link-state routing protocol can
create a “complete view,” or
topology, of the network.
⚫ Link-state protocols are
associated with Shortest Path
First (SPF) calculations.
⚫ A link-state router uses the link-
OR
state information to:
 Create a topology map
 Select the best path to all
destination networks in the
topology.
 Each router makes the
decision!

Link State routing protocols is like having a complete map of the network topology 39
Link-State Protocol Operation
⚫ Link-state protocols work best
in situations where
 The network design is
hierarchical, usually occurring
in large networks.
 The administrators have a
good knowledge of the
implemented link-state routing
protocol.
 Fast convergence of the
network is crucial.

40
Link-State Routing
Protocols

⚫ Open Shortest Path First (OSPF)


 Popular standards based routing protocol
⚫ Intermediate System-to-Intermediate System (IS-IS)
 Popular in provider networks

41
Link-State Concepts

42
Link-State
Protocols Work
Best When

⚫ The network design is


hierarchical, usually occurring in
large networks. EIGRP (Advanced
⚫ Fast convergence of the Distance Vector
network is crucial.
versus
⚫ “The administrators have a good
knowledge of the implemented OSPF (Link State)
link-state routing protocol.”
⚫ Rick’s thoughts….
43
Routing Protocol Behaviour
Classful Routing
Protocols
172.16.0.0/16
Major Classful
Network

⚫ Classful routing protocols do not send subnet mask information in


their routing updates:
 Only RIPv1 and IGRP are classful.
 Created when network addresses were allocated based on
classes (class A, B, or C).
 Cannot provide variable length subnet masks (VLSMs) and
classless interdomain routing (CIDR).
 Create problems in discontiguous networks. 45
R1 Forwards a Classful Update to R2
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

Routing update:
My 30 seconds are up. 172.16.0.0
I’m sending an update
to my RIP neighbor(s).

R2# show ip route | begin Gateway


Gateway of last resort is not set

R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:11, Serial0/0/0


192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/30 is directly connected, Serial0/0/1
L 192.168.2.2/32 is directly connected, Serial0/0/1
R2#

46
R3 Forwards a Classful Update to R2
Discontiguous Networks
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

Routing update: My 30 seconds are up.


172.16.0.0 I’m sending an update
to my RIP neighbor(s).

R2# show ip route | begin Gateway


Gateway of last resort is not set

R 172.16.0.0/16 [120/1] via 192.168.2.1, 00:00:14, Serial0/0/1


[120/1] via 192.168.1.1, 00:00:16, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/30 is directly connected, Serial0/0/1
L 192.168.2.2/32 is directly connected, Serial0/0/1
R2#

47
Connectivity Fails or Inconsistent at Best
Discontiguous Networks
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

R2# ping 172.16.1.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2
seconds:
U.U.U
Success rate is 0 percent (0/5)
R2#
R2# traceroute 172.16.1.1
Type escape sequence to abort.
Tracing the route to 172.16.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.1.1 4 msec
192.168.2.1 4 msec
192.168.1.1 4 msec
R2#

48
Classless Routing Protocols
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

Routing update:
My 30 seconds are up.
I’m sending an update 172.16.1.0/24
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets


R 172.16.1.0 [120/1] via 192.168.1.1, 00:00:06, Serial0/0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
R2#

⚫ Classless routing protocols include subnet mask information in the


routing updates:
 RIPv2, EIGRP, OSPF, and IS_IS and IPv6 routing protocols
 Support VLSM and CIDR
49
 Also support discontiguous networks
R3 Forwards a Classless Update to R2
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

Routing update:
My 30 seconds are up.
172.16.2.0/24 I’m sending an update
to my RIP neighbor(s).

R2# show ip route | begin Gateway


Gateway of last resort is not set

172.16.0.0/24 is subnetted, 2 subnets


R 172.16.1.0 [120/1] via 192.168.1.1, 00:00:03, Serial0/0/0
R 172.16.2.0 [120/1] via 192.168.2.1, 00:00:03, Serial0/0/1
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, Serial0/0/0
L 192.168.1.2/32 is directly connected, Serial0/0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/30 is directly connected, Serial0/0/1
L 192.168.2.2/32 is directly connected, Serial0/0/1
R2#

50
Connectivity Success
172.16.1.0/24 192.168.1.0/30 192.168.2.0/30 172.16.2.0/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0

R2# ping 172.16.1.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms
R2#
R2# traceroute 172.16.1.1
Type escape sequence to abort.
Tracing the route to 172.16.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.1.1 4 msec 4 msec *
R2#

51
Routing Protocol Characteristics
⚫ Speed of Convergence:
 Routing loops can occur when inconsistent routing tables are not
updated due to slow convergence in a changing network.
⚫ Scalability:
 Large networks require a scalable the routing protocol.
⚫ Classful or Classless (Use of VLSM and summarization):
 Classful routing protocols do not include the subnet mask and
cannot support VLSM while classless routing protocols do.
⚫ Resource Usage:
 Defines how much memory space (RAM), CPU utilization, and link
bandwidth utilization is required by the routing protocol.
⚫ Implementation and Maintenance:
 This describes the level of knowledge that is required for a network
administrator to implement and maintain the network based on the
routing protocol deployed.
 Rick’s opinion…. Link state is easier to understand, maintain and
52
troubleshoot the distance vector.
Routing Protocols by Characteristic

53
Metrics
Purpose of a Metric
?

⚫ Metrics are a way to measure or compare.


 Determine the best path.
⚫ Routing protocol learns multiple routes to the same destination.
 Metric is used to determine which path is most preferable
 Lower the metric, the better
55
Routing Protocols and Their Metrics

Routing Default
Description
Protocol Metric

RIP Hop count • Simple metric that counts the number of routers a packet traverses.

• Bandwidth influences path selection by preferring the path with the


Bandwidth highest overall bandwidth.

• Delay considers the time a packet takes to traverse a path.


EIGRP and
• Optionally, load (traffic utilization of a certain link) and reliability
Delay (probability of a link failure) can also be included in the metric
calculation.

OSPF Cost • A value based on the cumulative link bandwidths.

56
Routing Protocol Metrics
⚫ Different routing protocols use different metrics.
 Routing metrics are not interchangeable between routing
protocols.
 Two different routing protocols might choose different paths to
the same destination.

⚫ For example:

56 Kbps

57
R2# show ip route
<output omitted>
Gateway of last resort is not set
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:24, Serial0/0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
C 192.168.4.0/24 is directly connected, Serial0/0/1
R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.6.0/24 [120/1] via 192.168.2.1, 00:00:24, Serial0/0/0
[120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.7.0/24 [120/1] via 192.168.4.1, 00:00:26, Serial0/0/1
R 192.168.8.0/24 [120/2] via 192.168.4.1, 00:00:26, Serial0/0/1

⚫ All routers running RIP


⚫ What is the metric
(distance) for R2 to reach
the 192.168.8.0 network?
 2 (hops away)
⚫ What is the direction
(vector) for R2 to reach the
192.168.8.0 network?
 Serial 0/0/1 (via R3) 58
Load
Balancing

R2# show ip route


<output omitted>
R 192.168.6.0/24 [120/1] via 192.168.2.1, 00:00:24, Serial0/0/0
[120/1] via 192.168.4.1, 00:00:26, Serial0/0/1

⚫ What happens when two or more routes to the same destination have
identical metric values?
 The router load balances between these equal-cost paths.
 All routing protocols do equal cost load balancing.
 EIGRP also does unequal cost load balancing. 59
Purpose of Administrative Distance
⚫ What if a router learns about a remote
network from two different routing ?
sources.
⚫ What if RIP advertises the network as
10 hops away but OSPF advertises it
as a cumulative bandwidth of 100,000. So, which one would
⚫ Which is better RIP or OSPF? be preferred RIP or
 Can’t tell OSPF? OSPF
RIP: 1.1.1.1. is
 Can’t compare apples and oranges. 10 hops
OSPF: 1.1.1.1.
 Note: This is not common. is 100,000 BW
⚫ Administrative distance (AD) is:
 Used to determine which routing Which route would be
source takes precedence. preferred, OSPF or a Static
 Used when there are multiple Route to the same network?
routing sources for the same Static Route
destination network address.
⚫ Lower the AD the more preferred the
routing source. 60
Purpose of Administrative Distance
⚫ Cisco uses Administrative distance
(AD) to define the preference of a
routing source.
⚫ Routing sources:
 Directly connected networks
 Static routes
 Specific routing protocols
⚫ AD for static and dynamic can be
modifed (in CCNP)

Note
⚫ The term trustworthiness is
commonly used when defining
administrative distance.
⚫ The lower the administrative distance
value, the more trustworthy the route.
61
Purpose of Administrative Distance
⚫ AD: 0 to 255.
⚫ The lower the value, the more
preferred the route source.
⚫ AD of 0 is the most preferred.
 Only a directly connected
network has an administrative
distance of 0, which cannot be
changed.
 No better route to a network
than being directly connected
to that network.
⚫ AD of 255 means the router will
not believe the source of that route
 Route will not be installed in
the routing table.

62
Administrative Distance of a Route

R2

R1 R3

63
Distance Vector Routing
Protocol
Distance Vector Routing Protocols
Dynamic Routing Protocols

⚫ Distance vector routing protocols:


Interior Gateway Protocols  Share updates between neighbors
(IGP)
 Not aware of the network topology
⚫ RIPv1 sends periodically broadcasts
Distance Vector updates to IP 255.255.255.255 even if
Routing Protocols
topology has not changed
 Updates consume bandwidth and
RIPv1 IGRP network device CPU resources
⚫ EIGRP will only send an update when
RIPv2 EIGRP
topology has changed
⚫ RIPv2 and EIGRP use multicast
addresses

65
Routing Information Protocol ver. 1 (RIPv1)

I Can’t 15 hops 14 hops 13 hops 12 hops 11 hops 10 hops 9 hops


reach
192.168.1.0
8 hops
⚫ RIPv1 (RFC 1058) is a legacy 1stgeneration IPv4 protocol.
 Easy to configure, making it a good choice for small networks.
⚫ RIPv1 has the following key characteristics: 7 hops
 Metric = hop count (lower is better).
 Updates broadcasted every 30 seconds to 255.255.255.255.
6 hops
 If hop count > 15 hops = too far and the update is not
propagated.
5 hops
 RIP updates are encapsulated into a UDP segment, with both
source and destination port numbers set to UDP port 520.
1 hop 2 hops 3 hops 4 hops
192.168.1.0/24
66
Routing Information Protocol ver. 2 (RIPv2)

⚫ RIPv2 (RFC 1058) replaced RIPv1and included the following


improvements:
 Classless routing protocol: Supports VLSM and CIDR,
because it includes the subnet mask in the routing updates.
 Increased efficiency: Forwards updates to multicast address
224.0.0.9, instead of the broadcast address 255.255.255.255.
 Reduced routing entries: Supports manual route
summarization.
 Secure: Supports an authentication mechanism to secure
routing table updates between neighbors. 67
RIPv1 versus RIPv2

Characteristics and
RIPv1 RIPv2
Features

Both use hop count as a simple metric. The


Metric maximum number of hops is 15.

Forward Updates To Address 255.255.255.255 224.0.0.9

Supports VLSM  
Supports CIDR  
Supports Summarization  
Secure  

68
IGRP

⚫ The Interior Gateway Routing Protocol (IGRP) was the first proprietary
IPv4 routing protocol developed by Cisco in 1984.
⚫ Gave customers a choice between two standard protocols RIPv1 and
OSPF.
 No hop limit
 Easy to understand
⚫ Bandwidth and delay are used to create a composite metric.
 Optionally, load and reliability can also be included in the calculation.
⚫ Routing updates are broadcast every 90 seconds, by default.
69
EIGRP

⚫ 1n 1992, Enhanced IGRP (EIGRP) replaced IGRP.


 EIGRP also supports VLSM and CIDR, increases efficiency, reduces
routing updates, and supports secure message exchange.
⚫ EIGRP also introduced: (more later!)
 Bounded triggered updates
 Hello keepalive mechanism
 Maintains a topology table (DUAL – backup routes)
 Rapid convergence
 Multiple network layer protocol support (IPv4, IPv6, IPX, Appletalk)
70
IGRP versus EIGRP

Characteristics and
IGRP EIGRP
Features
Both use a composite metric consisting of
Metric bandwidth and delay. Reliability and load can
also be included in the metric calculation.

Forward Updates To Address 255.255.255.255 224.0.0.10

Supports VLSM  
Supports CIDR  
Supports Summarization  
Supports Authentication  

71
Routing Information Protocol
Why RIP?

⚫ RIP is rarely used in modern networks!


⚫ However, it’s useful as a foundation for understanding basic network
routing.
⚫ This section provides a brief overview of how to configure basic RIP
settings and to verify RIPv2. 73
Overview
RIPv1 RIPv2
Distance Vector or Link State? Distance Vector Distance Vector

Is it a Classless routing protocol?  ✓


Does it use triggered updates? ✓ ✓
Does it use either split horizon or split
horizon w/poison reverse? ✓ ✓
Does it uses hold-down timers? ✓ ✓
Is the maximum hop count = 15? ✓ ✓
Does it do auto summary? ✓ ✓
Does it support CIDR?  ✓
Does it support VLSM?  ✓
Does it support authentication?  ✓
74
RIP Cheat
Sheet

75
76
RIP Reference Topology
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

G0/0

G0/0

G0/0

77
Entering Routing Configuration Mode
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R1# conf t
Enter configuration commands, one per line. End with
CNTL/Z.
R1(config)# router rip
R1(config-router)#

78
RIP Configuration Options
R1(config-router)# ?
Router configuration commands:
address-family Enter Address Family command mode
auto-summary Enable automatic network number summarization
default Set a command to its defaults
default-information Control distribution of default information
default-metric Set metric of redistributed routes
distance Define an administrative distance
distribute-list Filter networks in routing updates
exit Exit from routing protocol configuration mode
flash-update-threshold Specify flash update threshold in second
help Description of the interactive help system
input-queue Specify input queue depth
maximum-paths Forward packets over multiple paths
neighbor Specify a neighbor router
network Enable routing on an IP network
no Negate a command or set its defaults
offset-list Add or subtract offset from RIP metrics
output-delay Interpacket delay for RIP updates
passive-interface Suppress routing updates on an interface
redistribute Redistribute information from another routing
protocol
timers Adjust routing timers
traffic-share How to compute traffic share over alternate paths
validate-update-source Perform sanity checks against source address of
routing updates
version Set routing protocol version

R1(config-router)#
79
Advertising the R1 Networks
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R1(config)# router rip


R1(config-router)# network 192.168.1.0
R1(config-router)# network 192.168.2.0
R1(config-router)#
⚫ To enable RIP and advertise a network, use the routing configuration
command network network-address
 Enter the network address for each directly connected network.
⚫ Entering the command automatically :
 Enables RIP on all interfaces that belong to a specific network.
 Interfaces now both send and receive RIP updates.
 Advertises the specified network in RIP updates every 30 seconds. 80
Advertising the R2 Networks
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R2(config)# router rip


R2(config-router)# network 192.168.2.0
R2(config-router)# network 192.168.3.0
R2(config-router)# network 192.168.4.0
R2(config-router)#

81
Advertising the R3 Networks
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R3(config)# router rip


R3(config-router)# network 192.168.4.0
R3(config-router)# network 192.168.5.0
R3(config-router)#

82
Verifying RIP Settings on R1
R1# show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 16 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/0 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.1.0
192.168.2.0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.2 120 00:00:15
Distance: (default is 120)
83
R1#
Verifying RIP Routes on R1
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R1# show ip route | begin Gateway


Gateway of last resort is not set

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


C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.1/32 is directly connected, Serial0/0/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:24, Serial0/0/0
R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:24, Serial0/0/0
R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:24, Serial0/0/0
R1#

84
Verifying RIP Settings on R2
R2# show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 16 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/0 1 1 2
Serial0/0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.2.0
192.168.3.0
192.168.4.0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.1 120 00:00:13
192.168.4.1 120 00:00:22
Distance: (default is 120)
85
Verifying RIP Routes on R2
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R2# show ip route | begin Gateway


Gateway of last resort is not set

R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:20, Serial0/0/0


192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.2/32 is directly connected, Serial0/0/0
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, GigabitEthernet0/0
L 192.168.3.1/32 is directly connected, GigabitEthernet0/0
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.2/32 is directly connected, Serial0/0/1
R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:01, Serial0/0/1
R2#
86
Verifying RIP Settings on R3
R3# show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 7 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.4.0
192.168.5.0
Routing Information Sources:
Gateway Distance Last Update
192.168.4.2 120 00:00:27
Distance: (default is 120)

87
Verifying RIP Routes on R3
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R3# show ip route | begin Gateway


Gateway of last resort is not set

R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:02, Serial0/0/1


R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:02, Serial0/0/1
R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:02, Serial0/0/1
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.1/32 is directly connected, Serial0/0/1
192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.5.0/24 is directly connected, GigabitEthernet0/0
L 192.168.5.1/32 is directly connected, GigabitEthernet0/0
R3#

88
RIP Versions
R1# show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"


Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 16 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 1 1 2
Serial0/0/0 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.1.0
192.168.2.0

<Output omitted>

⚫ By default, RIPv1 is enabled when entering router rip


⚫ Notice how R1 can send RIPv1 messages, but it can receive both
RIPv1 and RIPv2 messages.
 R1 would ignore the RIPv2 fields in the route entry.
89
Enable and Verify RIPv2 on R1
192.168.3.0/24

RIPv2
192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30
RIPv1 192.168.4.0/30
RIPv1

R1(config)# router rip


R1(config-router)# version 2
R1(config-router)# ^Z
R1#
R1# show ip protocols | section Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 2 2
Serial0/0/0 2 2
R1#

Note:
• Configuring version 1 enables RIPv1 only
• Configuring no version returns the router to the default settings.
90
Verifying RIP Routes on R1
192.168.3.0/24

RIPv2
192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30
RIPv1 192.168.4.0/30
RIPv1

R1# show ip route | begin Gateway


Gateway of last resort is not set

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


C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.1/32 is directly connected, Serial0/0/0
R1#

91
Enable and Verify RIPv2 on R2
192.168.3.0/24

192.168.1.0/24 RIPv2 .1 G0/0


192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30
RIPv1
RIPv2
R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# end
R2#
R2# show ip protocols | section Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 2 2
Serial0/0/0 2 2
Serial0/0/1 2 2
R2#

92
Verifying RIP Routes on R2
192.168.3.0/24

192.168.1.0/24 RIPv2 .1 G0/0


192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30
RIPv1
RIPv2
R2# show ip route | begin Gateway
Gateway of last resort is not set

R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:03, Serial0/0/0


192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.2/32 is directly connected, Serial0/0/0
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, GigabitEthernet0/0
L 192.168.3.1/32 is directly connected, GigabitEthernet0/0
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.2/32 is directly connected, Serial0/0/1
R2#

93
Enable and Verify RIPv2 on R3
192.168.3.0/24

192.168.1.0/24 RIPv2 .1 G0/0


192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30
RIPv2 192.168.4.0/30
RIPv2
R3(config)# router rip
R3(config-router)# version 2
R3(config-router)# end
R3#
R3# show ip protocols | section Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0 2 2
Serial0/0/1 2 2
R3#

94
Verifying RIP Routes on R3
192.168.3.0/24

192.168.1.0/24 RIPv2 .1 G0/0


192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30
RIPv2 192.168.4.0/30
RIPv2
R3# show ip route | begin Gateway
Gateway of last resort is not set

R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:02, Serial0/0/1


R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:02, Serial0/0/1
R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:02, Serial0/0/1
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.1/32 is directly connected, Serial0/0/1
192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.5.0/24 is directly connected, GigabitEthernet0/0
L 192.168.5.1/32 is directly connected, GigabitEthernet0/0
R3#

95
96
Auto-Summary and
RIPv2

What do you expect to see?


R2# show ip route

R 172.30.0.0/16 [120/1] via 209.165.200.230, 00:00:28, Serial0/0/0


[120/1] via 209.165.200.234, 00:00:18, Serial0/0/1
209.165.200.0/30 is subnetted, 2 subnets
C 209.165.200.232 is directly connected, Serial0/0/1
C 209.165.200.228 is directly connected, Serial0/0/0
10.0.0.0/16 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet0/0
S 192.168.0.0/16 is directly connected, Null0

⚫ You still see the summarized 172.30.0.0/16 route with the same
two equal-cost paths. 97
Auto-Summary and RIPv2

R1# show ip protocols


Routing Protocol is “rip”
<output omitted>
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
FastEthernet0/1 2 2
Serial0/1/0 2 2
Automatic network summarization is in effect

⚫ By default, RIPv2 automatically summarizes networks at major


network boundaries, just like RIPv1.
⚫ Both R1 and R3 routers are still summarizing their 172.30.0.0
98
subnets
Disabling Auto-summary in RIPv2
R2(config)# router rip
R2(config-router)# no auto-summary

R3(config)# router rip


R3(config-router)# no auto-summary

R1(config)# router rip


R1(config-router)# no auto-summary

R1# show ip protocols


<output omitted>
Automatic network summarization is not in effect
<output omitted>

⚫ To modify the default RIPv2 behavior of automatic summarization, use the no


auto-summary command
⚫ RIPv2 no longer summarizes networks to their classful address at boundary
routers but instead includes all subnets and their appropriate masks in its routing 99
updates.
Verifying RIPv2 Updates
What do you expect to see?
R2# show ip route

172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks


R 172.30.200.32/28 [120/1] via 209.165.200.234, 00:00:09, Serial0/0/1
R 172.30.200.16/28 [120/1] via 209.165.200.234, 00:00:09, Serial0/0/1
R 172.30.2.0/24 [120/1] via 209.165.200.230, 00:00:03, Serial0/0/0
R 172.30.1.0/24 [120/1] via 209.165.200.230, 00:00:03, Serial0/0/0
R 172.30.100.0/24 [120/1] via 209.165.200.234, 00:00:09, Serial0/0/1
R 172.30.110.0/24 [120/1] via 209.165.200.234, 00:00:09, Serial0/0/1
209.165.200.0/30 is subnetted, 2 subnets
C 209.165.200.232 is directly connected, Serial0/0/1
C 209.165.200.228 is directly connected, Serial0/0/0
10.0.0.0/16 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet0/0
S 192.168.0.0/16 is directly connected, Null0

⚫ The routing table for R2 now contains the individual subnets for 172.30.0.0/16.
⚫ Notice that a single summary route with two equal-cost paths no longer exists.
⚫ Each subnet and mask has its own specific entry, along with the exit interface and
100
next-hop address to reach that subnet.
Verifying RIPv2 Updates

R1# show ip route

172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks


R 172.30.200.32/28 [120/2] via 209.165.200.229, 00:00:01, Serial0/0/0
R 172.30.200.16/28 [120/2] via 209.165.200.229, 00:00:01, Serial0/0/0
C 172.30.2.0/24 is directly connected, Loopback0
C 172.30.1.0/24 is directly connected, FastEthernet0/0
R 172.30.100.0/24 [120/2] via 209.165.200.229, 00:00:01, Serial0/0/0
R 172.30.110.0/24 [120/2] via 209.165.200.229, 00:00:01, Serial0/0/0
209.165.200.0/30 is subnetted, 2 subnets
R 209.165.200.232 [120/1] via 209.165.200.229, 00:00:02, Serial0/0/0
C 209.165.200.228 is directly connected, Serial0/0/0
10.0.0.0/16 is subnetted, 1 subnets
R 10.1.0.0 [120/1] via 209.165.200.229, 00:00:02, Serial0/0/0
R 192.168.0.0/16 [120/1] via 209.165.200.229, 00:00:02, Serial0/0/0

⚫ Fully converged routing tables. 101


Verifying RIPv2 Updates

R3# show ip route

172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks


C 172.30.200.32/28 is directly connected, Loopback2
C 172.30.200.16/28 is directly connected, Loopback1
R 172.30.2.0/24 [120/2] via 209.165.200.233, 00:00:01, Serial0/0/1
R 172.30.1.0/24 [120/2] via 209.165.200.233, 00:00:01, Serial0/0/1
C 172.30.100.0/24 is directly connected, FastEthernet0/0
C 172.30.110.0/24 is directly connected, Loopback0
209.165.200.0/30 is subnetted, 2 subnets
C 209.165.200.232 is directly connected, Serial0/0/1
R 209.165.200.228 [120/1] via 209.165.200.233, 00:00:02, Serial0/0/1
10.0.0.0/16 is subnetted, 1 subnets
R 10.1.0.0 [120/1] via 209.165.200.233, 00:00:02, Serial0/0/1
R 192.168.0.0/16 [120/1] via 209.165.200.233, 00:00:02, Serial0/0/1

102
⚫ Fully converged routing tables.
RIP Passive Interfaces
192.168.3.0/24

192.168.1.0/24 .1 G0/0
192.168.5.0/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

⚫ Sending out unneeded updates on a LAN:


 Wastes Bandwidth
 Wastes Resources
 Security Risk
⚫ The passive-interface
 Stops routing updates out the specified interface.
 The network that the specified interface belongs to is still
advertised in routing updates that are sent out other interfaces.
 Should be configured on interfaces which do not connect to
other RIP routers. 105
Configuring a Passive Interface on R1
192.168.3.0/24

Routing update:
192.168.1.0/24 192.168.1.0/24 192.168.5.0/24
.1 G0/0
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1

192.168.2.0/30 192.168.4.0/30

R1(config)# router rip


R1(config-router)# passive-interface g0/0
R1(config-router)# end
R1#
R1# show ip protocols | begin Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
192.168.1.0
192.168.2.0
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.2 120 00:00:06
Distance: (default is 120) 106
Configuring a Passive Interface on R2
R2(config)# router rip
R2(config-router)# passive-interface g0/0
R2(config-router)# end
R2#
*Mar 10 16:33:32.391: %SYS-5-CONFIG_I: Configured from console by
console
R2# show ip protocols | begin Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0/0 2 2
Serial0/0/1 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
192.168.2.0
192.168.3.0
192.168.4.0
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.1 120 00:00:24
Gateway Distance Last Update
192.168.4.1 120 00:00:23
Distance: (default is 120)

R2#

107
Configuring a Passive Interface
NOTE:
on R3
R3(config)# router rip
R3(config-router)# passive-interface default • As an alternative, all interfaces can be
R3(config-router)# no passive-interface s0/0/1 made passive using the passive-
R3(config-router)# end interface default command.
R3# • Interfaces that should not be passive can
*Mar 10 16:34:28.899: %SYS-5-CONFIG_I: Configured from console by
be re-enabled using the no passive-
console
R3# show ip protocols | begin Default interface command.
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0/1 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
192.168.4.0
192.168.5.0
Passive Interface(s):
Embedded-Service-Engine0/0
GigabitEthernet0/0
GigabitEthernet0/1
GigabitEthernet0/3
Serial0/0/0
Routing Information Sources:
Gateway Distance Last Update
192.168.4.2 120 00:00:23
Distance: (default is 120)

R3#

108
RIP Propagating a Default Static Route
Internet
192.168.3.0/24
209.165.200.224/27
.226

192.168.1.0/24 S0/0/1 192.168.5.0/24


.225 .1 G0/0
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
192.168.2.0/30 192.168.4.0/30

⚫ It is common to configure a default static route on an edge router


and then propagating the default route throughout the routing
domain using the routing protocol.
 Otherwise, you would have to individually configure default static
routes on all internal routers.
⚫ Edge router must be configured with default static route:
 ip route 0.0.0.0 0.0.0.0 exit-intf next-hop-ip
⚫ Propagated to other routers via RIP using:
 default-information originate
109
Propagating a Default Route on R1
Internet
192.168.3.0/24
209.165.200.224/27
.226

192.168.1.0/24 S0/0/1 192.168.5.0/24


.225 .1 G0/0
.1 DCE DCE .1
RIP DefaultS0/0/0
S0/0/0 Route R2RIPS0/0/1
Default Route
S0/0/1
R3
G0/0 R1 G0/0
.1 .2 .2 .1
192.168.2.0/30 192.168.4.0/30

R1(config)# ip route 0.0.0.0 0.0.0.0 S0/0/1 209.165.200.226


R1(config)# router rip
R1(config-router)# default-information originate
R1(config-router)# ^Z
R1#
*Mar 10 23:33:51.801: %SYS-5-CONFIG_I: Configured from
console by console

Note: Best to use only a next-hop route when CEF is enabled.

110
Verifying RIP
Routes on R1

R1# show ip route | begin Gateway


Gateway of last resort is 209.165.200.226 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.226, Serial0/0/1


192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.1/32 is directly connected, Serial0/0/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:08, Serial0/0/0
R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:08, Serial0/0/0
R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:08, Serial0/0/0
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.0/24 is directly connected, Serial0/0/1
L 209.165.200.225/27 is directly connected, Serial0/0/1 111
R1#
Verifying RIP
Routes on R2

R2# show ip route | begin Gateway


Gateway of last resort is 192.168.2.1 to network 0.0.0.0

R* 0.0.0.0/0 [120/1] via 192.168.2.1, 00:00:21, Serial0/0/0


R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:25, Serial0/0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Serial0/0/0
L 192.168.2.2/32 is directly connected, Serial0/0/0
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, GigabitEthernet0/0
L 192.168.3.1/32 is directly connected, GigabitEthernet0/0
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.2/32 is directly connected, Serial0/0/1
R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:15, Serial0/0/1
R2#
112
Verifying RIP
Routes on R3

R3# show ip route | begin Gateway


Gateway of last resort is 192.168.4.2 to network 0.0.0.0

R* 0.0.0.0/0 [120/2] via 192.168.4.2, 00:00:00, Serial0/0/1


R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:00, Serial0/0/1
R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:00, Serial0/0/1
R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:00, Serial0/0/1
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/24 is directly connected, Serial0/0/1
L 192.168.4.1/32 is directly connected, Serial0/0/1
192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.5.0/24 is directly connected, GigabitEthernet0/0
L 192.168.5.1/32 is directly connected, GigabitEthernet0/0
R3#

113
Configuring RIPng
RIPng Reference Topology
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R2(config)# router rip


R2(config-router)# network 192.168.2.0

⚫ No network command with router rip


⚫ interface configuration command:
Router(config-if)# ipv6 rip domain-name enable

115
Enabling RIPng on the R1 Interfaces
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R1(config)# ipv6 unicast-routing


R1(config)#
R1(config)# interface gigabitethernet 0/0
R1(config-if)# ipv6 rip RIP-AS enable
R1(config-if)# exit
R1(config)#
R1(config)#interface serial 0/0/0
R1(config-if)# ipv6 rip RIP-AS enable
R1(config-if)#

116
Enabling RIPng on the R2 Interfaces
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R2(config)# ipv6 unicast-routing


R2(config)#
R2(config)# interface gigabitethernet 0/0
R2(config-if)# ipv6 rip RIP-AS enable
R2(config-if)# exit
R2(config)#
R2(config)# interface serial 0/0/0
R2(config-if)# ipv6 rip RIP-AS enable
R2(config-if)# exit
R2(config)#
R2(config-if)# interface serial 0/0/1
R2(config-if)# ipv6 rip RIP-AS enable
R2(config-if)#

117
Enabling RIPng on the R3 Interfaces
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R3(config)# ipv6 unicast-routing


R3(config)#
R3(config)# interface gigabitethernet 0/0
R3(config-if)# ipv6 rip RIP-AS enable
R3(config-if)# exit
R3(config)#
R3(config)# interface serial 0/0/1
R3(config-if)# ipv6 rip RIP-AS enable
R3(config-if)#
R3#
*Mar 12 14:17:06.103: %SYS-5-CONFIG_I: Configured from
console by console)

118
Verifying RIP Settings on R1
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R1# show ipv6 protocols


IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "ND"
1 IPv6 Routing Protocol is "rip RIP-AS"
2 Interfaces:
Serial0/0/0
GigabitEthernet0/0
Redistribution:
None
R1#

119
Verifying Routing Table on R1
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R1# show ipv6 route

<Output omitted>

C 2001:DB8:CAFE:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:CAFE:1::1/128 [0/0]
via GigabitEthernet0/0, receive
R 2001:DB8:CAFE:2::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0
R 2001:DB8:CAFE:3::/64 [120/3]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0
C 2001:DB8:CAFE:A001::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:CAFE:A001::1/128 [0/0]
via Serial0/0/0, receive
R 2001:DB8:CAFE:A002::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0

<Output omitted> 120


Verifying RIP Routing Table on R1
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R1# show ipv6 route rip


IPv6 Routing Table - default - 8 entries
<output omitted>

R 2001:DB8:CAFE:2::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0
R 2001:DB8:CAFE:3::/64 [120/3]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0
R 2001:DB8:CAFE:A002::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/0
R1#

121
Verifying RIP Routing Table on R2
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R2# show ipv6 route rip


IPv6 Routing Table - default - 9 entries
<output omitted>

R 2001:DB8:CAFE:1::/64 [120/2]
via FE80::FE99:47FF:FE75:C3E0, Serial0/0/0
R 2001:DB8:CAFE:3::/64 [120/2]

R2#

122
Verifying RIP Routing Table on R3
2001:DB8:CAFE:2::/64

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64
:1 G0/0
:1 DCE DCE :1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
:1 :2 :2 :1

2001:DB8:CAFE:A001::/64 2001:DB8:CAFE:A002::/64

R3# show ipv6 route rip


<Output omitted>

R 2001:DB8:CAFE:1::/64 [120/3]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/1
R 2001:DB8:CAFE:2::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/1
R 2001:DB8:CAFE:A001::/64 [120/2]
via FE80::FE99:47FF:FE71:78A0, Serial0/0/1
R3#

123
Link-State Routing Protocols
Classifying Routing Protocols
▪ Open Shortest Path First (OSPF)
Dynamic Routing Protocols
is the most common IGP routing
protocol implemented within an
organizational AS.
Interior Gateway Protocols • Began in 1987
(IGP) • OSPFv2 - OSPF for IPv4
networks
Link-State
• OSPFv3 - OSPF for IPv6
Routing Protocols networks
▪ Intermediate-System to
Intermediate-System (IS-IS) is a
less popular link-state protocol
sometimes used within service
OSPF IS-IS
provider networks.
 IS-IS was designed by
International Organization for
Standardization (ISO )
125
Shortest Path First (SPF) Algorithm

Distance Vector Link-State

⚫ Link-state routing protocols (a.k.a. shortest path first protocols) are


based on Edsger Dijkstra’s shortest path first (SPF) algorithm.

⚫ The SPF algorithm is used to calculate the best path route.


 The SPF algorithm uses accumulated costs along each path,
from source to destination, to determine the total cost of a route. 126
Shortest Path First (SPF) Algorithm
⚫ Shortest path from R2 to the R3 LAN:
⚫ Each router calculates
 R2 to R1: 20 the SPF algorithm and
 R1 to R3: 5 determines the cost from
 R3 - R3 LAN: 2 its own perspective.
Cost: 27 (more later)

127
R1 SPF Tree

128
R2 SPF Tree

129
R3 SPF Tree

130
R4 SPF Tree

131
R5 SPF Tree

132
Link-State Routing Process
1. Each router learns about its own links, its own directly connected networks.
(Interface is “up”)
2. Each router is responsible for meeting its neighbors on directly connected
networks. (OSPF Hello packets)
3. Each router builds a link-state packet (LSP) containing the state of each
directly connected link. (neighbor ID, link type, and bandwidth)
4. Each router floods the LSP to all neighbors, who then store all LSPs
received in a database.
 Neighbors then flood the LSPs to their neighbors until all routers in the
area have received the LSPs.
5. Each router uses the database to construct a complete map of the topology
and computes the best path to each destination network.
 The SPF algorithm is used to construct the map of the topology and to
determine the best path to each network. (Road map)
 All routers will have a common map or tree of the topology, but each
router will independently determine the best path to each network within
that topology.

133
⚫ Detail and explanations are coming next!
Step 1: Learning About
Directly Connected
Networks

⚫ Step 1: Each router learns about its own links, its own directly
connected networks.
 Interface configured with an IP address/subnet mask.
 Directly connected networks are now part of the routing table
 Regardless of the routing protocols used.
⚫ A link is an interface on a router.
⚫ For the link participate in the link-state routing process, it must be:
 In the up state.
134
 Included in the routing protocol (coming).
Step 1 Link 2
• Network: 10.2.0.0/16
• IP address: 10.2.0.1
• Type of network: Serial
• Cost of that link: 20
• Neighbors: R2
Link 1
• Network: 10.1.0.0/16
• IP address: 10.1.0.1 Link 3
• Type of network: Ethernet • Network: 10.3.0.0/16
• Cost of that link: 2 • IP address: 10.3.0.1
• Neighbors: None • Type of network: Serial
• Cost of that link: 5
• Neighbors: R3

Link 4
• Network: 10.4.0.0/16
⚫ Link states - Information about the state of a • IP address: 10.4.0.1
router’s links • Type of network: Serial
• Cost of that link: 20
⚫ This information includes interface’s: • Neighbors: R4
 IP address/mask
 Type of network
 Ethernet (broadcast) or serial point-to-point
link
 Cost of that link
 Any neighbor routers on that link 135
Step 1

Initially:
⚫ Router unaware of any neighbor routers on the link.
⚫ Learns of neighbor when receives a Hello packet from the adjacent
neighbor.

136
Hello, I’m
R2

Step 2: Hello, I’m R1


Sending Hello Hello, I’m
Packets to R3

Neighbors
Hello, I’m
R4

⚫ Step 2: Each router is responsible for meeting its neighbors on directly


connected networks.
 Use a Hello protocol to discover any neighbors on their links.
 A neighbor is any other router that is enabled with the same link-state
routing protocol. 137
Hello, I’m R2 &
still here
Step 2: Sending
Hello Packets to Hello, I’m R1
& still here
Neighbors
Hello, I’m R3 &
still here

Whatever happened to the


Hellos from R4?

Hello packets
⚫ “Keepalive” function
⚫ Stops receiving Hello packets from a neighbor, that neighbor is
considered unreachable and the adjacency is broken.
138
Step 3: Building
the Link-State
Packet

⚫ Step 3: Each router builds a link-state


packet (LSP) containing the state of each
directly connected link.

139
Step 3: Building
the Link-State
Packet

⚫ After established its adjacencies


 Builds its LSPs
 Link-state information about its links.
 Sends LSPs out interfaces where it has established adjacencies with
other routers.
 R1 not sent LSPs out its Ethernet interface.
140
Step 4: Flooding Link-State
Packets to Neighbors

⚫ Step 4: Each router floods the LSP to all neighbors, who then store all
LSPs received in a database.
 Each router floods its link-state information to all other link-state routers.
 When a router receives an LSP from a neighboring router, sends that
LSP out all other interfaces, except the interface that received the LSP.
 Flooding effect of LSPs throughout the routing area.
⚫ Link-state routing protocols calculate the SPF algorithm after the flooding is
complete.
141
Step 4: Flooding Link-State
Packets to Neighbors

⚫ An LSP needs to be sent only:


 During initial startup of the router or of the routing protocol process on
that router
 Whenever there is a change in the topology,
 link going down
 link coming up
 neighbor adjacency being established
 neighbor adjacency being broken 142
Link State Database for R1

Step 5:
Constructing a
Link-State
Database
⚫ Step 5 (Final Step):
Each router uses the
database to construct a
complete map of the
topology and computes
the best path to each
destination network.

⚫ After propagation of LSPs


 Each router will then have an LSP from every link-state router.
 LSPs stored in the link-state database.
143
Running SPF
Algorithm

⚫ Each router in the routing area can now use the SPF algorithm to
construct the SPF trees that you saw earlier.
144
Step 5: Constructing a Link-State Database
SPF Tree for R1

⚫ With a complete link-state database, R1 can use shortest path first (SPF)
algorithm to calculate shortest path to each network.
⚫ SPF algorithm results in an SPF tree.

145
Building the Shortest Path First
(SPF) Tree
Link State Database for R1

⚫ At first, the tree (topology) only includes its directly connected


neighbors.
⚫ Using the link-state information from all other routers, R1 can
now begin to construct an SPF tree of the network with itself
at the root of the tree.

146
R1 Processes the LSPs from R2
Red: New
information
for tree.

⚫ The SPF algorithm begins by processing the following LSP information from R2:
 Connected to neighbor R1 on network 10.2.0.0/16, cost of 20
 Connected to neighbor R5 on network 10.9.0.0/16, cost of 10
147
 Has a network 10.5.0.0/16, cost of 2
R1 Processes the LSPs from R3
Red: New
information
for tree.

⚫ The SPF algorithm begins by processing the following LSP information from R3:
 Connected to neighbor R1 on network 10.3.0.0/16, cost of 5
 Connected to neighbor R4 on network 10.7.0.0/16, cost of 10
148
 Has a network 10.6.0.0/16, cost of 2
R1 Processes the LSPs from R4
Red: New
information
for tree.

⚫ The SPF algorithm begins by processing the following LSP information from R4:
 Connected to neighbor R1 on network 10.4.0.0/16, cost of 20
 Connected to neighbor R3 on network 10.7.0.0/16, cost of 10
 Connected to neighbor R5 on network 10.10.0.0/16, cost of 10 149
 Has a network 10.8.0.0/16, cost of 2
R1 Processes the LSPs from R5
Red: New
information
for tree.

⚫ The SPF algorithm begins by processing the following LSP information from R5:
 Connected to neighbor R2 on network 10.9.0.0/16, cost of 10
 Connected to neighbor R4 on network 10.10.0.0/16, cost of 10
 Has a network 10.11.0.0/16, cost of 2 150
SPF Tree

⚫ R1 has now constructed the


complete SPF tree.

151
Determining the
Shortest Path

⚫ Using the SPF tree, SPF algorithm results in the shortest path to each
network.
 Note: Only the LANs are shown in the table, but SPF can also be used
to determine the shortest path to each WAN link network.

152
Network 10.5.0.0/16
Determining the via R2 Serial 0/0/0 2
at a cost of 22
Shortest Path
20

153
Determining the
Shortest Path

2
5

Network 10.6.0.0/16 via R3 Serial 0/0/1


at a cost of 7

154
Determining the
Shortest Path

10

Network 10.7.0.0/16 via


R3 Serial 0/0/1 at a
cost of 15

155
Determining the
Shortest Path

10

Network 10.8.0.0/16 via 2


R3 Serial 0/0/1 at a
cost of 17

156
Network 10.9.0.0/16
Determining the via R2 Serial 0/0/0
at a cost of 30
Shortest Path 10
20

157
Determining the
Shortest Path

10

10

Network 10.10.0.0/16
via R3 Serial 0/0/1
at a cost of 25

158
Determining the
Network 10.11.0.0/16 via
Shortest Path R3 Serial 0/0/1 at a
cost of 27

5 2

10

10

159
Determining the
Shortest Path

⚫ Each router constructs its own SPF tree independently from all other
routers.
⚫ Link-state databases must be identical on all routers.

160
Generating a Routing Table from the SPF Tree
SPF Tree for R1

⚫ These paths listed previously can now be added to the routing table.
⚫ The routing table will also include
 Directly connected networks
 Routes from any other sources, such as static routes.
⚫ Packets will now be forwarded according to these entries in the routing
table.

161
Advantages of Link-State Routing Protocols

• LS routing protocols exchange link-states, and can therefore use the


Builds a SPF algorithm to build an SPF tree of the network.
Topological Map • Using the SPF tree, each router can determine the shortest path to
every network.

• When receiving an LSP, LS protocols immediately flood the LSP out all
interfaces except for the interface from which the LSP was received.
Fast Convergence • In contrast, RIP processes each message, updates the routing table,
then flood to the next neighbour.

• After the initial flooding of LSPs, link-state routing protocols only send
Event-driven
out an LSP when there is a change in the topology.
Updates • The LSP contains only the information regarding the affected link.

• Link-state routing protocols use the concept of areas to enable a


Hierarchical Design hierarchical design to networks, allowing for better route aggregation
(summarization) and the isolation of routing issues within an area.

162
Disadvantages of Link-State Routing Protocols

Memory • Link-state protocols require additional memory to create and maintain


Requirements the link-state database and SPF tree.

• Link-state protocols can also require more CPU processing than


distance vector routing protocols.
Processing
• The SPF algorithm requires more CPU time than distance vector
Requirements algorithms such as Bellman-Ford, because link-state protocols build a
complete map of the topology.

• The flooding of link-state packets can adversely affect the available


Bandwidth bandwidth on a network.
Requirements • This should only occur during initial startup of routers, but can also be an
issue on unstable networks.

163
Addressing Disadvantages
⚫ Create areas to minimize the router memory requirements,
processing requirements, and bandwidth requirenments.

164
Routing Table
Understanding the Routing
Table

⚫ For more details: Cisco IP Routing, by Alex Zinin (ISBN 0-201-


60473-6)

166
Reference Topology – Connected and Local
Internet
172.16.2.0/24 172.16.3.0/24
209.165.200.234/30

172.16.1.0/24 S0/0/1 .1 G0/0 .1 G0/0 172.16.4.0/28


.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/1 R1 R2 S0/0/1 R3 G0/1
.225 .226 .229 .230

209.165.200.224/30 209.165.200.228/30

R1# show ip route | begin Gateway


Gateway of last resort is 209.165.200.234 to network 0.0.0.0
192.168.0.0/16
S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1
is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1# 167
Directly Connected Entries
Internet
172.16.2.0/24 172.16.3.0/24
209.165.200.234/30

172.16.1.0/24 S0/0/1 .1 G0/0 .1 G0/0 172.16.4.0/28


.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/1 R1 R2 S0/0/1 R3 G0/1
.225 .226 .229 .230

Common codes for remote 209.165.200.224/30 209.165.200.228/30


networks include:
• S - Static route
• D - EIGRP routing protocol 192.168.0.0/16
• O - OSPF routing protocol
• R - RIP routing protocol

C 172.16.1.0/24 is directly connected, GigabitEthernet0/0


L 172.16.1.1/32 is directly connected, GigabitEthernet0/0

Route Destination Outgoing


Source Network Interface

168
Reference Topology
Internet
172.16.2.0/24 172.16.3.0/24

172.16.1.0/24 S0/0/1 .1 G0/0 .1 G0/0 172.16.4.0/28


.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/1 R1 R2 S0/0/1 R3 G0/1
.225 .226 .229 .230

209.165.200.224/30 209.165.200.228/30

R1# show ip route | begin Gateway


Gateway of last resort is 209.165.200.234 to network 0.0.0.0
192.168.0.0/16
S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1
is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1# 169
Reference Topology
Internet
172.16.2.0/24 172.16.3.0/24

172.16.1.0/24 S0/0/1 .1 G0/0 .1 G0/0 172.16.4.0/28


.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/1 R1 R2 S0/0/1 R3 G0/1
.225 .226 .229 .230

209.165.200.224/30 209.165.200.228/30

192.168.0.0/16

Destination Next-Hop Route


Metric
Network Address Timestamp

R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0

Route Administrative Outgoing


Source Distance Interface

170
IPv4 Routing Table:

Ultimate route
Level 1 route
Level 1 parent route
Level 2 child routes
Ultimate Route
⚫ An ultimate route is a routing table entry that contains either:
 a next-hop IP address or
 an exit interface
 This can be directly connected, dynamic, static, and link local
routes are ultimate routes.
R1#show ip route | begin Gateway
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#
172
Level 1 Routes

R2# show ip route


<output omitted>
This is a Level 1 Route
C 192.168.1.0/24 is directly connected, Serial0/0/1

Network Subnet Mask is equal to Class C Mask


Address is
a Class C
Address

⚫ A level 1 route is a route with a subnet mask equal to or less than the
classful mask of the network address.

173
Level 1 Route
Next-hop IP address
Level 1 Routes
and/or exit interface
192.168.1.0/24

192.168.0.0/16

0.0.0.0/0

⚫ level 1 route can function as any of the following:


 Default route:
 A default route is a static route with the address 0.0.0.0/0.
 Supernet route:
 Route with Network address with a mask less than the classful
mask.
 Network route:
 Route is a route that has a subnet mask equal to that of the classful
mask.

174
Level 1
Routes

C 192.168.1.0/24 is directly connected, Serial0/0


Class C Mask Exit Interface

⚫ Why is directly connected network 192.168.1.0/24 a:


 Level 1 network route?
 Subnet mask that is the same as its classful mask.
 Ultimate route?
 Contains the exit interface Serial 0/0/1.

175
Level 1 Parent Route
⚫ A level 1 parent route is a level 1 route that is subnetted.
 A level 1 parent route is automatically created any time a
subnet is added to the routing table.
 A parent route can never be an ultimate route.
 Each entry displays the classful network address, the number of
subnets and the number of different subnet masks that the
classful address has been subdivided into.
R1# show ip route | begin Gateway
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0

176
Level 2 Child Route
⚫ A level 2 child route is a route that is a subnet of a classful network
address.
 Like a level 1 route, the source of a level 2 route can be a
directly connected network, a static route, or a dynamically
learned route. Level 2 child routes are also ultimate routes.
R1# show ip route | begin Gateway
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12, Serial0/0/0

177
Child Routes (Using 12.4 IOS, so no Local Routes)

178
Routing Table Lookup Process
IP Packet

Routing Table

Find “best match”

179
Route Lookup Process

1. If the best match is a level 1 ultimate route, then this route is used
to forward the packet.
2. If the best match is a level 1 parent route, proceed to the next step.
 The router examines child routes of the parent route for a best match.
3. If there is a match with a level 2 child route, that subnet is used to
forward the packet.
4. If there is no match with any of the level 2 child routes, then the
router continues searching level 1 supernet routes in the routing
table for a match, including the default route, if there is one.
5. If there is now a lesser match with a level 1 supernet or default
routes, the router uses that route to forward the packet.
6. If there is not a match with any route in the routing table, the router
drops the packet.

180
R1#show ip route | begin Gateway 192.168.1.100
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#
⚫ Packet with Destination IPv4 address 192.168.1.100
 One Level 1 Ultimate Routes to choose from.
 192.168.0.0/16 is the best (only) match, the longest match (coming).
 Longest match: Most left-most bits that match between destination IP
address and route in routing table
 At a minimum it must match the number of bits in the route as indicated by
181
the subnet mask.
R1#show ip route | begin Gateway 172.16.3.10
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#
⚫ Packet with Destination IPv4 address 172.16.3.10
 No Level 1 Ultimate Routes match
 Matches Level 1 Parent Route (minimum match is classful mask).
 Look for matching Child route
 At a minimum it must match the number of bits in the route as indicated by
the subnet mask.
182
 If more than one child route matches choose routes with longest match.
R1#show ip route | begin Gateway 10.1.2.3
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#
⚫ Packet with Destination IPv4 address 10.1.2.3
 No Level 1 Ultimate Routes to choose match
 No Level 1 Parent Routes match
 Look for supernet route (mask less than classful mask), including default route
 Choose longest match.
 Default route always matches because 0 bits have to match. 183
 0 matching bits makes it the “gateway of last resort”
R1#show ip route | begin Gateway 10.1.2.3

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#

⚫ Packet with Destination IPv4 address 10.1.2.3


 No default route
 No Level 1 Ultimate Routes to choose match
 No Level 1 Parent Routes match
 No supernet routes match
 Drop packet 184
Route Lookup Process (FYI)

1. If the best match is a level 1 ultimate route, then this route is used
to forward the packet.

185
Match Level 1 Routes (FYI)
Next-hop IP
Level 1 Routes Level 2 Routes address and/or
exit interface

192.168.1.0/24

192.168.0.0/16

0.0.0.0/0

186
Route Lookup Process (FYI)

1. If the best match is a level 1 ultimate route, then this route is used
to forward the packet.
2. If the best match is a level 1 parent route then the router examines
child routes (the subnet routes) of the parent route for a best
match.
3. If there is a match with a level 2 child route, that subnet is used to
forward the packet.

187
Match Level 2 Child Routes (FYI)
Next-hop IP
Level 1 Routes Level 2 Routes address and/or
exit interface

192.168.1.0/24

192.168.0.0/16

0.0.0.0/0

172.16.0.0 172.16.1./24
172.16.2./24
172.16.3./24
172.16.4./28

209.165.224.0 209.165.224.0/30
209.165.228.0/30
209.165.232.0/30

188
Match Supernet and Then Default Route
(FYI)
Next-hop IP
Level 1 Routes Level 2 Routes address and/or
exit interface

192.168.1.0/24

192.168.0.0/16

0.0.0.0/0

189
Best Route = Longest Match (FYI)

⚫ The best match is the route in the routing table that has the most
number of far left matching bits with the destination IPv4 address of
the packet.

⚫ The route with the greatest number of equivalent far left bits, or the
longest match, is always the preferred route.

191
A packet is destined for 172.16.0.10
⚫ The router has three possible routes that match this packet:
 172.16.0.0/12
 172.16.0.0/18
 172.16.0.0/26.

⚫ Of the three routes, 172.16.0.0/26 has the longest match and is


therefore chosen to forward the packet.

192
R1#show ip route | begin Gateway 172.16.3.10
Gateway of last resort is 209.165.200.234 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 209.165.200.234, Serial0/0/1


is directly connected, Serial0/0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/0
L 172.16.1.1/32 is directly connected, GigabitEthernet0/0
R 172.16.2.0/24 [120/1] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.3.0/24 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 172.16.4.0/28 [120/2] via 209.165.200.226, 00:00:12,Serial0/0/0
R 192.168.0.0/16 [120/2] via 209.165.200.226, 00:00:03, Serial0/0/0
209.165.200.0/24 is variably subnetted, 5 subnets, 2 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
R 209.165.200.228/30 [120/1]via209.165.200.226,0:0:12,Serial0/0/0
C 209.165.200.232/30 is directly connected, Serial0/0/1
L 209.165.200.233/30 is directly connected, Serial0/0/1
R1#

193
Longest Match Example
172.16.3.10

194
Longest Match 172.16.3.10

Example

195
Longest Match 172.16.3.10

Example

196
Longest Match 172.16.3.10

Example

197
Question

⚫ Assume that a router has four routing processes running on it, and
each process has received these routes:
 EIGRP (internal): 192.168.32.0/26
 RIP: 192.168.32.0/24
 OSPF: 192.168.32.0/19

⚫ Which of these routes will be installed in the routing table?

▪ All of them! Different masks so different routes.

198
Longest Match

⚫ Although EIGRP has the best administrative distance, each of these


routes has a different prefix length (subnet mask).
 They are therefore considered different destinations and are all
installed in the routing table.

199
Longest Match

⚫ Longer prefixes are always preferred over shorter ones when


forwarding a packet.

200
Longest Match Quiz #1

⚫ If a packet arrives on a router interface destined for 192.168.32.1,


which route would the router choose?

201
Longest Match Quiz #1

⚫ Because 192.168.32.1 falls within network 192.168.32.0/26.


 Network 192.168.32.0 to 192.168.32.63.
 It also falls within the other two routes available, but the
192.168.32.0/26 has the longest prefix.

202
Longest Match Quiz #2

⚫ If a packet arrives on a router interface destined for 192.168.32.100,


which route would the router choose?

203
Longest Match Quiz #2

⚫ It is directed toward 10.1.1.2 because it falls within network


192.168.32.0/24.
 Network 192.168.32.0 to 192.168.32.254.
 It also falls within the OSPF route, but the 192.168.32.0/24 has
the longest prefix than /19.

204
IPv6 Routing Tables
R1# show ipv6 route
⚫ Components of the IPv6
<Output omitted>
routing table are very
C 2001:DB8:CAFE:1::/64 [0/0] similar to the IPv4 routing
via GigabitEthernet0/0, directly connected table (directly connected
L 2001:DB8:CAFE:1::1/128 [0/0]
via GigabitEthernet0/0, receive interfaces, static routes,
D 2001:DB8:CAFE:2::/64 [90/3524096] and dynamically learned
via FE80::3, Serial0/0/1
D 2001:DB8:CAFE:3::/64 [90/2170112] routes).
via FE80::3, Serial0/0/1 ⚫ IPv6 is classless by
C 2001:DB8:CAFE:A001::/64 [0/0]
via Serial0/0/0, directly connected design, all routes are
L 2001:DB8:CAFE:A001::1/128 [0/0] effectively level 1 ultimate
via Serial0/0/0, receive
D 2001:DB8:CAFE:A002::/64 [90/3523840] routes.
via FE80::3, Serial0/0/1  There is no level 1
C 2001:DB8:CAFE:A003::/64 [0/0]
via Serial0/0/1, directly connected parent of level 2 child
L 2001:DB8:CAFE:A003::1/128 [0/0] routes.
via Serial0/0/1, receive
L FF00::/8 [0/0]
via Null0, receive
R1#

206
Reference IPv6 Topology

EIGRP for IPv6


2001:DB8:CAFE:2::/64
Routing Domain
LLA: FE80::2
G0/0 :1

S0/0/0
:2
R2
S0/0/1
2001:DB8:CAFE:A001::/64
:1
2001:DB8:CAFE:A002::/64
64 kbps
S0/0/0 1024 kbps
S0/0/1
:1 :2
LLA: FE80::1 1544 kbps LLA: FE80::3
S0/0/1 S0/0/0
:1 :2 R3
R1 2001:DB8:CAFE:A003::/64
G0/0 G0/0
:1 :1

2001:DB8:CAFE:1::/64 2001:DB8:CAFE:3::/64

207
Directly Connected Networks of R1
R1# show ipv6 route

<Output omitted>

C 2001:DB8:CAFE:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:CAFE:1::1/128 [0/0]
via GigabitEthernet0/0, receive
D 2001:DB8:CAFE:2::/64 [90/3524096]
via FE80::3, Serial0/0/1
D 2001:DB8:CAFE:3::/64 [90/2170112]
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A001::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:CAFE:A001::1/128 [0/0]
via Serial0/0/0, receive
D 2001:DB8:CAFE:A002::/64 [90/3523840]
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A003::/64 [0/0]
via Serial0/0/1, directly connected
L 2001:DB8:CAFE:A003::1/128 [0/0]
via Serial0/0/1, receive
L FF00::/8 [0/0]
via Null0, receive
R1#
208
Directly Connected Networks of R1

Destination Metric
Network

C 2001:DB8:CAFE:A001::/64 [0/0]
via Serial0/0/0, directly connected

Route Administrative
Source Outgoing Distance
Interface

209
Remote Network Entries on R1
R1# show ipv6 route

<Output omitted>

C 2001:DB8:CAFE:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:CAFE:1::1/128 [0/0]
via GigabitEthernet0/0, receive
D 2001:DB8:CAFE:2::/64 [90/3524096]
via FE80::3, Serial0/0/1
D 2001:DB8:CAFE:3::/64 [90/2170112]
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A001::/64 [0/0]
via Serial0/0/0, directly connected
L 2001:DB8:CAFE:A001::1/128 [0/0]
via Serial0/0/0, receive
D 2001:DB8:CAFE:A002::/64 [90/3523840]
via FE80::3, Serial0/0/1
C 2001:DB8:CAFE:A003::/64 [0/0]
via Serial0/0/1, directly connected
L 2001:DB8:CAFE:A003::1/128 [0/0]
via Serial0/0/1, receive
L FF00::/8 [0/0]
via Null0, receive
R1#
210
Remote Networks of R1

Destination Metric
Network

D 2001:DB8:CAFE:3::/64 [90/2170112]
via FE80::3, Serial0/0/1

Route Administrative
Source Outgoing Interface Distance

Link-Local Interfae

211
Chapter 3: Summary
⚫ Dynamic routing protocols:
⚫ Used by routers to automatically learn about remote networks from
other routers
⚫ Purpose includes: discovery of remote networks, maintaining up-to-
date routing information, choosing the best path to destination
networks, and ability to find a new best path if the current path is no
longer available
⚫ Best choice for large networks but static routing is better for stub
networks.
⚫ Function to inform other routers about changes
⚫ Can be classified as either classful or classless, distance-vector or
link-state, and an interior or an exterior gateway protocol

212
Chapter 3: Summary (cont.)
⚫ Dynamic routing protocols:
⚫ A link-state routing protocol can create a complete view or topology
of the network by gathering information from all of the other routers
⚫ Metrics are used to determine the best path or shortest path to
reach a destination network
⚫ Different routing protocols may use different (hops, bandwidth,
delay, reliability, and load)
⚫ Show ip protocols command displays the IPv4 routing protocol
settings currently configured on the router, for IPv6, use show ipv6
protocols

213
Chapter 3: Summary (cont.)

⚫ Dynamic routing protocols:


⚫ Cisco routers use the administrative distance value to determine
which routing source to use
⚫ Each dynamic routing protocol has a unique administrative value,
along with static routes and directly connected networks, lower is
preferred the route
⚫ Directly connected networks are preferred source, followed by static
routes and then various dynamic routing protocols
⚫ An OSPF link is an interface on a router, information about the state
of the links is known as link-states
⚫ Link-state routing protocols apply Dijkstra’s algorithm to calculate
the best path route which uses accumulated costs along each path,
from source to destination, to determine the total cost of a route

214

You might also like