0% found this document useful (0 votes)
3K views

Chapter 4 Distance Vector Routing Protocols

The document discusses distance vector routing protocols, including how they discover networks through an initial exchange of routing information between neighboring routers and periodic updates, how they use algorithms to calculate best paths and maintain routing tables, and some of their advantages like simplicity but also disadvantages like slow convergence times. It also covers topics like routing loops, routing table maintenance, and examples of common distance vector protocols.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views

Chapter 4 Distance Vector Routing Protocols

The document discusses distance vector routing protocols, including how they discover networks through an initial exchange of routing information between neighboring routers and periodic updates, how they use algorithms to calculate best paths and maintain routing tables, and some of their advantages like simplicity but also disadvantages like slow convergence times. It also covers topics like routing loops, routing table maintenance, and examples of common distance vector protocols.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 68

Chapter 4

Distance Vector Routing


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

Last Updated: 3/9/2009


Topics
 Introduction to Distance Vector  Routing Loops
Routing Protocols  Defining a Routing Loop
 Distance Vector Technology  Implications of Routing Loops
 Routing Protocol Algorithms  Count-to-Infinity Condition
 Routing Protocol  Preventing Routing Loops by
Characteristics setting a Maximum Metric
Value
 Network Discovery  Preventing Routing Loops with
 Cold Start Hold-down Timers
 Initial Exchange of Routing  Preventing Routing Loops with
Information the Split Horizon Rule
 Exchange of Routing  Preventing Routing Loops with
Information IP and TTL
 Distance Vector Routing Protocols
 Routing Table Maintenance Today
 Periodic Updates  RIP
 Bounded Updates  EIGRP
 Triggered Updates
 Random Jitter
2
Introduction to Distance Vector
Routing Protocols
 Distance Vector Technology
 Routing Protocol Algorithms
 Routing Protocol Characteristics
Introduction to Distance Vector Routing Protocols

 Understanding the operation of distance vector routing is critical to enabling,


verifying, and troubleshooting these protocols.
4
 Configuring and maintaining static routes for a large network would be
overwhelming.
 What happens when that link goes down at 3:00 a.m.? 5
Why did Cisco develop
IGRP/EIGRP?

 RIP: Routing Information Protocol originally specified in RFC 1058.


 IGRP: Interior Gateway Routing Protocol - Cisco proprietary
 EIGRP: Enhanced IGRP – Cisco proprietary
 IGRP and EIGRP: Cisco never submitted RFCs to IETF for these protocols. 6
Meaning of Distance Vector
 Distance vector (repeat)
 Routes are advertised as vectors of
distance and direction.
 Direction is simply the:
 nexthop router or
 exit interface.
 Routing protocol
 Does not know the topology of an
internetwork.
 Only knows the routing information
received from its neighbors.

7
Meaning of Distance Vector

I can get to
172.16.3.0/24 in
one hop out my
S0/0/0.

 What is the Distance to 172.16.3.0/24?


 1 hop
 What is the Direction:
 S0/0/0
 Does R1 have a topology map?
 No, it only knows distance and direction!

8
Operation of Distance Vector Routing Protocols
Timer
Timer
Expires
Expires

Timer Timer
Expires Expires

Periodic updates
 Some distance vector routing protocols periodically broadcast the entire
routing table to each of its neighbors. (RIP and IGRP)
 30 seconds for RIP
 Inefficient:
 Bandwidth and CPU resources
 Always sent, even no changes
9
Operation of Distance Vector Routing Protocols

Neighbor of R1

R1 is
unaware of
R3 and its
Neighbor of R1 networks

 What are Neighbors?


 Neighbors are routers that:
 Share a link
 Use the same routing protocol.
 What are the only addresses routers know about before there is any routing
knowledge?
 Network addresses of its own interfaces
10
 Network addresses of its neighbors.
Operation of Distance Vector Routing Protocols
Timer
Expires

 Routing Protocols use


 Broadcast updates (255.255.255.255)
 Multicast updates
 Neighbor routers will process the updates.
 What will other devices on that link do if they receive a routing update but
are not running that routing protocol including hosts?
 They will process the update up to Layer 3 (Multicast update) or Layer 4
11
(Broadcast update) before discarding it.
Routing Protocol Algorithms

 The routing protocol algorithm used by a particular routing protocol


is responsible for building and maintaining the router’s routing table.

12
Routing Protocol Algorithms

Update

Update

 The algorithm sends and receives updates.

13
Calculating best paths and
Routing Protocol Algorithms installing new routes

Update

Update

 The algorithm on each router:


 Independently makes calculations updates its routing table

14
Detecting and reacting to
Routing Protocol Algorithms topology change

Update
X

 The algorithm on each router:


 Detect and react to topology changes.

15
Routing Protocol
Characteristics

More later

 Time to convergence:
 Faster the better.
 Scalability:
 How large a network the routing protocol can handle.
 Classless (use of VLSM) or classful:
 Support VLSM and CIDR
 Resource usage:
 Routing protocol usage of RAM, CPU utilization, and link bandwidth
utilization.
 Implementation and maintenance:
 Level of knowledge that is required for a network administrator.

16
Advantages and Disadvantages of Distance Vector
Routing Protocols

 Advantages:  Disadvantages:
 Simplicity  Slow convergence
 Low resource requirements  Limited scalability
 Minimum link bandwidth  Potential for routing loops
(coming)

17
Comparing Routing Protocol Features

 Note: Some of this is relative such as Resource usage and


Implementation and Maintenance.

18
Network Discovery
 Cold Start
 Initial Exchange of Routing Information
 Exchange of Routing Information
Cold Start

 Network discovery is part of the process of the routing protocol algorithm


that enables routers to first learn about remote networks.
 First: Only knows directly connected networks.

20
Initial Exchange of Routing Information

Update

Update

 R1:
 Sends an update about network 10.1.0.0 out the Serial 0/0/0 interface with a
metric of 1
 Sends an update about network 10.2.0.0 out the FastEthernet 0/0 interface with
a metric of 1
 Receives an update from R2 about network 10.3.0.0 on Serial 0/0/0 with a metric
of 1
21
 Stores network 10.3.0.0 in the routing table with a metric of 1
Initial Exchange of Routing Information

Update

Update

 R2:
 Sends an update about network 10.3.0.0 out the Serial 0/0/0
interface with a metric of 1
 Sends an update about network 10.2.0.0 out the Serial 0/0/1
interface with a metric of 1 22
Initial Exchange of Routing Information
Update

Update

 R3:
 Sends an update about network 10.4.0.0 out the Serial 0/0/1
interface with a metric of 1
 Sends an update about network 10.3.0.0 out the FastEthernet
0/0 interface with a metric of 1 23
Initial Exchange of Routing Information

 Have we reached convergence?


 No
 What needs to still be learned?
 R1 does not have knowledge of 10.4.0.0
 R3 does not have knowledge of 10.1.0.0
24
Next Exchange of Routing Information
Thanks, but
nothing new
Update

Update

 R1:
 Sends out complete routing table.
 Does R2 learn anything new?
 No

25
Next Exchange of Routing Information

Update

Update

S0/0/1

 R2:
 Sends out complete routing table.
 Does R1 Learn anything new?
 Yes, 10.4.0.0
 Does R3 Learn anything new?
 Yes, 10.1.0.0 26
Next Exchange of Routing Information
Update

Update

S0/0/1

 R3:
 Sends out complete routing table.
 Does R2 learn anything new?
 No

27
Note on Split Horizon

X 10.1.0.0 Update

10.1.0.0 Update 10.1.0.0 Update

S0/0/1

 Distance vector routing protocols typically implement a technique known as


split horizon.
 Prevents information from being sent out the same interface from which
it was received.
 More later
28
Convergence 5
 The amount of time it takes
for a network to converge is 4
directly proportional to the
size of that network.
 Routing protocols are 3
compared based on how
fast they can propagate this
information—their speed to
2
convergence.

29
Routing Table Maintenance
 Periodic Updates
 Bounded Updates
 Triggered Updates
 Random Jitter
Periodic Updates
Periodic Periodic Periodic
Update Update Update

Periodic Update Periodic


Periodic Update
Update

S0/0/1

 Depending on the routing protocol, routers must maintain the routing


tables so that they have the most current routing information.
 Some distance vector routing protocols use periodic updates.
 RIP and IGRP
 Sent even when there is no new information.
31
Periodic Updates
Periodic Periodic Periodic
Update Update Update

Periodic Update Periodic


Periodic Update
Update

S0/0/1

 Routing update may contain a topology change.


 What might those changes be?:
 Failure of a link
 Introduction of a new link
 Failure of a router
 Change of link parameters 32
Still
No update
no update
for 10.4.0.0
for 10.4.0.0
fromfrom
R3
R3 received.
received,Remove
mark routethisas
route
RIP Timers “possibly
from the
down”,
routing
buttable.
routing table.
leave in

Periodic
Update

Periodic Update

S0/0/1
IOS implements three additional timers for RIP.
 Update timer: 30 seconds.
 Invalid Timer: If an update has not been received in 180 seconds (the
default), the route is marked as invalid by setting the metric to 16.
 Route still is in routing table.
 Flush Timer: 240 seconds (default)
 When the flush timer expires, the route is removed from the routing
table.
 Hold-down Timer: 180 seconds (default)
33
 Later in this chapter.
RIP Timers

R1# show ip route Elapsed time since the last update, expressed in seconds

10.0.0.0/16 is subnetted, 4 subnets


C 10.2.0.0 is directly connected, Serial0/0/0
R 10.3.0.0 [120/1] via 10.2.0.2, 00:00:04, Serial0/0/0
C 10.1.0.0 is directly connected, FastEthernet0/0
R 10.4.0.0 [120/2] via 10.2.0.2, 00:00:04, Serial0/0/0
R1# show ip protocols
Routing Protocol is “rip”
Sending updates every 30 seconds, next due in 13 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
<output omitted>
Routing Information Sources:
Gateway Distance Last Update
10.3.0.1 120 00:00:27

 RIP timer values can be verified with two commands: show ip


34
route and show ip protocols.
Bounded Updates

 EIGRP does not send periodic updates.


 EIGRP sends bounded updates about a route when a path changes or the
metric for that route changes.
 Note: More in Chapter 9 EIGRP.

35
Triggered Updates Update timer
not yet expired

X
Triggered Update

 A triggered update is a routing table update that is sent


immediately in response to a routing change.
 Triggered updates do not wait for update timers to
expire.
 What is the advantage to a triggered update?
 Speeds up convergence.

36
Random Jitter

Collision! We will randomize our


updates between 25.5
and 30 seconds so
collisions don’t happen.

 To prevent the synchronization of updates between routers, Cisco


IOS uses a random variable, called RIP_JITTER, which subtracts a
variable amount of time to the update interval for each router in the
network.
 Ranges from 0 to 15 percent of the specified update interval.
 25.5 to 30 seconds for the default 30-second interval. 37
Routing Loops
 Defining a Routing Loop
 Implications of Routing Loops
 Count-to-Infinity Condition
 Preventing Routing Loops by setting a Maximum Metric Value
 Preventing Routing Loops with Hold-down Timers
 Preventing Routing Loops with the Split Horizon Rule
 Preventing Routing Loops with IP and TTL
Defining a Routing Loop

 A routing loop is a condition in which a packet is continuously transmitted


within a series of routers without ever reaching its intended destination
network.
 Can occur when two or more routers have inaccurate routing
information to a destination network.
 Issue with distance vector routing protocols but not link-state.
 The loop can be a result of:
 Incorrectly configured static routes
 Incorrectly configured route redistribution (CCNP-level courses)
 Inaccurate routing because of slow convergence in a changing network
39
Implications of Routing Loops

 A routing loop can have a devastating


effect on a network.

 What might a some problems with a routing loop?


 A routing loop can create the following conditions:
 Link bandwidth – looping traffic
 Router’s CPU - Burdened with useless packet forwarding
 Routing updates might get lost or not processed in time.
 Packets might get lost in “black holes”.

40
This is great, I now have a
Implications of Routing Loops route to 10.4.0.0 again!

IP Packet: DA 10.4.1.1
Loop until TTL is 0

Periodic Update
X
10.4.0.0 2 hops thru me

10.4.0.0 S0/0/1 2

S0/0/1

Assuming no split horizon, what if 10.4.0.0 network goes down?


Is there a potential for a problem here?
Let’s see…

41
I mistakenly believe I have
Implications of Routing Loops a route to 10.4.0.0.

S0/0/1

 Mechanisms available to eliminate routing loops:


 Defining a maximum metric to prevent count to infinity
 Hold-down timers
 Split horizon
 Route poisoning or poison reverse
 Triggered updates (covered previously)

42
Count-to-Infinity Condition
Periodic Update
10.4.0.0 3
5 hops thru me

Periodic Update
X
10.4.0.0 4
2 hops thru me

10.4.0.0 S0/0/1 42

S0/0/1
3

 Count to infinity is a condition that exists when inaccurate routing updates


increase the metric value to “infinity” for a network that is no longer
reachable.
 Each protocol defines infinity at a different value.
43
Count-to-Infinity Condition Periodic Update 10.4.0.0
13 hops thru
Periodic me 10.4.0.0
Update
15 hops thru
Periodic me 10.4.0.0
Update
16 hops thru me
Periodic Update 10.4.0.0

X
12 hops thru
Periodic me 10.4.0.0
Update
14 hops thru
Periodic me 10.4.0.0
Update
16 hops thru me

10.4.0.0 S0/0/1 10
12
14
16
12 S0/0/1
13
16 means “network 15 16 means “network
16
unreachable” in RIP unreachable” in RIP
 This count continues indefinitely, each router thinking the other router has a
route to 10.4.0.0.
 To eventually stop the incrementing of the metric, “infinity” is defined by
setting a maximum metric value.
 RIP defines infinity as 16 hops — an “unreachable” metric.
 When the routers “count to infinity,” they mark the route as unreachable. 44
Preventing Routing Loops with
Hold-Down Timers

 A routing loop could also be created by a periodic update that is


sent by the routers during the instability.
 Hold-down timers:
 Prevent routing loops from being created by these conditions.

45
Preventing Routing Loops with Hold-Down Timers Update timer
not yet expired

X
Triggered Update

S0/0/1

 Network 10.4.0.0 attached to R3 goes down.


 R3 sends a triggered update.

46
Preventing Routing Loops with Hold-Down Timers

X
Triggered Update

S0/0/1

Possibly down - Start Hold-down Timer

 R2 receives the update from R3 indicating that network 10.4.0.0 is now no


longer accessible.
 R2 marks the network as possibly down and starts the hold-down timer.

47
Preventing Routing Loops with Hold-Down Timers

X
Triggered Update

S0/0/1

Possibly down - Start Hold-down Timer


Update with
better metric

 If an update with a better metric for that network is received from


any neighboring router during the hold-down period, R2 will
reinstate the network and the hold-down timer will be removed.
 Note: In this example their can’t be a better metric than 1 hop. 48
Preventing Routing Loops with Hold-Down Timers

Update with worse metric:


X
10.4.0.0 3 hops

S0/0/1

Possibly
Same or down
worse- metric
Start Hold-down
- Still possibly
Timerdown - Keep
Hold-down Timer going

 If an update from any other neighbor is received during the hold-down


period with the same or worse metric for that network, that update is
ignored.
 Thus, more time is allowed for the information about the change to be
49
propagated.
Preventing Routing Loops with Hold-Down Timers

X
IP Packet: DA 10.4.1.1

S0/0/1

Possibly down Possibly down

 R1 and R2 still forward packets to 10.4.0.0, even though it is marked as


possibly down.
 This allows the router to overcome any issues associated with intermittent
connectivity.
 If the destination network is truly unavailable and the packets are forwarded,
black-hole routing is created and lasts until the hold-down timer expires. 50
Preventing Routing Loops with Hold-Down Timers
Expires Expires

S0/0/1

Possibly down Possibly down

 When the hold-down timers expire on R1 and R2, 10.4.0.0 is removed


from the routing table.
 No traffic to 10.4.0.0 will be routed – packets dropped by each router.

51
Preventing Routing Loops with the Split Horizon Rule

S0/0/1

 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.
 What network(s) will R1 NOT include in its routing updates to R2?
 10.3.0.0 and 10.4.0.0
 What network(s) will R2 NOT include in its routing updates R1? R3?
 R1: 10.1.0.0 R3: 10.4.0.0
 What network(s) will R3 NOT include in its routing updates R2?
 10.1.0.0 and 10.2.0.0 52
Preventing Routing Loops with the Split Horizon Rule

Periodic Update: Periodic Update:


Periodic Update:
10.4.0.0 X 10.4.0.0 X 10.4.0.0

S0/0/1

1. R3 advertises the 10.4.0.0 network to R2.


2. R2 receives the information and updates its routing table.
3. R2 then advertises the 10.4.0.0 network to R1 out S0/0/0.
 R2 does not advertise 10.4.0.0 to R3 out S0/0/1, because the route
originated from that interface.
4. R1 receives the information and updates its routing table.
5. Because of split horizon, R1 also does not advertise the information about
network 10.4.0.0 back to R2. 53
Preventing Routing Loops with the Split Horizon Rule

S0/0/1
 What networks does R1 advertise to R2?
 R1 advertises network 10.1.0.0 to R2.
 What networks does R2 advertise to R1?
 R2 advertises networks 10.3.0.0 and 10.4.0.0 to R1.
 What networks does R2 advertise to R3?
 R2 advertises networks 10.1.0.0 and 10.2.0.0 to R3.
 What networks does R3 advertise to R2?
 R3 advertises network 10.4.0.0 to R2.
 Notice that each router increments the hop count before sending the
update.
 Split horizon can be disabled by an administrator to achieve the proper
routing under certain conditions. 54
Route Poisoning

 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.

55
Split Horizon with Poison Reverse

Periodic Update:
10.4.0.0 = 16

S0/0/1

 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.

56
Preventing Routing Loops with IP and TTL

 The Time to Live (TTL) is an 8-bit field in the IP header that limits
the number of hops a packet can traverse through the network
before it is discarded.
 The TTL is decreased by 1 by every router on the route to its
destination.
 If the TTL field reaches 0 before the packet arrives at its destination,
the packet is discarded and the router sends an Internet Control
Message Protocol (ICMP) error message back to the source of the
IP packet.
57
Preventing Routing Loops with IP and TTL

IP Packet: DA 10.4.1.1
Loop until TTL is 0

Periodic Update
X
10.4.0.0 2 hops thru me

10.4.0.0 S0/0/1 2

S0/0/1

 Situation where the routing tables do not have accurate information about
the downed 10.4.0.0 network.
 Even in the case of this routing loop, packets will not loop endlessly in the
network.
 Eventually the TTL value will be decreased to 0 and the packet will be
discarded by the router.
58
Distance Vector Routing
Protocols Today
 RIP
 EIGRP
Distance Vector Routing Protocols Today

 Although link-state routing protocols have several advantages over


distance vector routing protocols, distance vector routing protocols
are still in use today.
 Link-state routing protocols will be discussed later.

60
RIP and EIGRP

 For distance vector routing protocols, there really are only two
choices: RIP or EIGRP.
 The decision about which routing protocol to use in a given situation
is influenced by a number of factors, including
 Size of the network
 Compatibility between models of routers
 Administrative knowledge required
61
RIPv1: First Look
RIPv1: First Look

 Download Packet Tracer Topology: cis82-RIPv1-A-student.pkt

63
Specifying Networks Only directly connected classful network
addresses!
R1(config)# router rip
R1(config-router)# network directly-connected-classful-network-address
R1(config-router)# ...

R2(config)# router rip


R2(config-router)# network directly-connected-classful-network-address
R2(config-router)# ...

R3(config)# router rip


R3(config-router)# network directly-connected-classful-network-address
R3(config-router)# ...

 Use the network command for each directly connected network.

64
Specifying Networks Only directly connected classful network
addresses!
R1(config)# router rip
R1(config-router)# network 192.168.1.0
R1(config-router)# network 192.168.2.0
Verify with the commands:
R2(config)# router rip show ip route show
R2(config-router)# network 192.168.2.0 ip protocols
R2(config-router)# network 192.168.3.0
R2(config-router)# network 192.168.4.0

R3(config)# router rip


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

 If you enter a subnet or host IP address, IOS automatically converts


it to a classful network address.
 For example, if you enter the command network 192.168.1.32,
the router will convert it to network 192.168.1.0.
65
Verifying RIP: show ip route Command
R1# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
<output omitted>
Gateway of last resort is not set

R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0


R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:02, Serial0/0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0

 An R in the output indicates RIP routes.


 Because this command displays the entire routing table, including
directly connected and static routes, it is normally the first command
used to check for convergence.
 Routes might not immediately appear when you execute the
command because networks take some time to converge.. 66
Verifying RIP: show ip route Command
R2# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
<output omitted>
Gateway of last resort is not set

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:12, Serial0/0/1
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

67
Verifying RIP: show ip route Command
R3# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
<output omitted>
Gateway of last resort is not set

C 192.168.4.0/24 is directly connected, Serial0/0/1


C 192.168.5.0/24 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:08, Serial0/0/1
R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:08, Serial0/0/1
R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:08, Serial0/0/1

68

You might also like