Chapter 4 Distance Vector Routing Protocols
Chapter 4 Distance Vector Routing Protocols
7
Meaning of Distance Vector
I can get to
172.16.3.0/24 in
one hop out my
S0/0/0.
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
12
Routing Protocol Algorithms
Update
Update
13
Calculating best paths and
Routing Protocol Algorithms installing new routes
Update
Update
14
Detecting and reacting to
Routing Protocol Algorithms topology change
Update
X
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
18
Network Discovery
Cold Start
Initial Exchange of Routing Information
Exchange of Routing Information
Cold Start
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
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
S0/0/1
29
Routing Table Maintenance
Periodic Updates
Bounded Updates
Triggered Updates
Random Jitter
Periodic Updates
Periodic Periodic Periodic
Update Update Update
S0/0/1
S0/0/1
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
35
Triggered Updates Update timer
not yet expired
X
Triggered Update
36
Random Jitter
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
41
I mistakenly believe I have
Implications of Routing Loops a route to 10.4.0.0.
S0/0/1
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
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
45
Preventing Routing Loops with Hold-Down Timers Update timer
not yet expired
X
Triggered Update
S0/0/1
46
Preventing Routing Loops with Hold-Down Timers
X
Triggered Update
S0/0/1
47
Preventing Routing Loops with Hold-Down Timers
X
Triggered Update
S0/0/1
S0/0/1
Possibly
Same or down
worse- metric
Start Hold-down
- Still possibly
Timerdown - Keep
Hold-down Timer going
X
IP Packet: DA 10.4.1.1
S0/0/1
S0/0/1
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
S0/0/1
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
55
Split Horizon with Poison Reverse
Periodic Update:
10.4.0.0 = 16
S0/0/1
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
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
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)# ...
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
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
68