4.1.1 Distance Vector Routing Protocols

advertisement
Distance Vector Routing Protocols
Routing Protocols and Concepts – Chapter 4
1
Objectives
ƒ
Identify the characteristics of distance vector routing protocols
ƒ
Describe the network discovery process of distance vector
routing protocols using Routing Information Protocol (RIP).
ƒ
Describe the processes to maintain accurate routing tables
used by distance vector routing protocols.
ƒ
Identify the conditions leading to a routing loop and explain
the implications for router performance.
ƒ
Identify the types of distance vector routing protocols in use
today
2
Context Index
ƒ 4.1 Introduction to Distance Vector Routing Protocols
ƒ 4.2 Network Discovery
ƒ 4.3 Routing Table Maintenance
ƒ 4.4 Routing Loops
ƒ 4.5 Distance Vector Routing Protocols Today
ƒ 4.6 Lab Activities
3
4.1 Introduction to
Distance Vector Routing Protocols
4
4.1.1 Distance Vector Routing Protocols
ƒ Dynamic routing protocols help the network administrator overcome the timeconsuming and exacting process of configuring and maintaining static routes.
ƒ Examples of Distance Vector routing protocols:
ƒRouting Information Protocol (RIP)
ƒInterior Gateway Routing Protocol (IGRP)
ƒEnhanced Interior Gateway Routing Protocol (EIGRP)
5
4.1.1 Distance Vector Routing Protocols
ƒ RIP
–Hop count is used as the metric for path selection.
–If the hop count for a network is greater than 15, RIP cannot supply a route to
that network.
–Routing updates are broadcast or multicast every 30 seconds, by default.
ƒ IGRP (Cisco proprietary)
–Bandwidth, delay, load and reliability are used to create a composite metric.
–Routing updates are broadcast every 90 seconds, by default.
–IGRP is the predecessor of EIGRP and is now obsolete.
ƒ EIGRP (Cisco proprietary)
–It can perform unequal cost load balancing.
–It uses Diffusing Update Algorithm (DUAL扩散更新算法) to calculate the
shortest path.
–Routing updates are sent only when there is a change in the topology.(触发更
新)
6
4.1.2 Distance Vector Technology
ƒ As the name implies, distance vector means that routes are advertised
as vectors of distance and direction. Distance is defined in terms of a
metric such as hop count and direction is simply the next-hop router or
exit interface.
ƒ The Meaning of Distance Vector:
–A router using distance vector routing protocols knows 2 things:
ƒDistance to final destination
ƒVector or direction traffic should be directed
7
4.1.2 Distance Vector Technology
ƒ Characteristics of Distance Vector routing protocols: flash
ƒ Periodic updates
ƒ Neighbors: are routers that share a link and are configured to use the
same routing protocol. Routers using distance vector routing are not aware of
the network topology.
ƒ Broadcast updates, Some distance vector routing protocols use multicast
addresses
ƒ Entire routing table is included with routing update, Some distance
vector routing protocols like EIGRP do not send periodic routing table updates.
8
4.1.3 Routing Protocol Algorithm
ƒ At the core of the distance vector protocol is the algorithm.
The algorithm is used to calculate the best paths and then
send that information to the neighbors.
ƒ Routing Protocol Algorithm:
–Mechanism for sending and receiving routing information.
–Mechanism for calculating the best paths and installing routes in the
routing table.
–Mechanism for detecting and reacting to topology changes.
ƒ Flash good
9
4.1.4 Routing Protocols Characteristics
ƒ Criteria used to compare routing protocols includes:
ƒ Time to convergence: Time to convergence defines how quickly the
routers in the network topology share routing information and reach a state of
consistent knowledge.
ƒ Scalability: Scalability defines how large a network can become based on
the routing protocol that is deployed.
ƒ Classless (Use of VLSM) or Classful: Classless routing protocols
include the subnet mask in the updates.
ƒ Resource usage: Resource usage includes the requirements of a routing
protocol such as memory space, CPU utilization, and link bandwidth
utilization.
ƒ Implementation & maintenance: Implementation and maintenance
describes the level of knowledge that is required for a network administrator
to implement and maintain the network based on the routing protocol
deployed.
10
4.1.4 Routing Protocols Characteristics
11
4.1.4 Routing Protocols Characteristics
ƒ Routing Protocol Learning Check
12
4.2 Network Discovery
13
4.2.1 Cold Start
ƒ Router initial start up (flash)
–Initial network discovery
–Directly connected networks and subnet masks are initially placed
in routing table
14
4.2.2 Initial Exchange of Routing Information
ƒ If a routing protocol is configured, the routers begin
exchanging routing updates.
ƒ Initially, these updates only include information about
their directly connected networks. Upon receiving an
update, the router checks it for new information.
ƒ Any routes that are not currently in its routing table are
added.
ƒ Initial Exchange
ƒ 向对面传递
ƒ Detail to Flash 4.2.2
15
4.2.2 Initial Exchange of Routing Information
16
4.2.2 Initial Exchange of Routing Information
17
4.2.3 Exchange of Routing Information
ƒ Next Update
ƒ The routers have knowledge about their own directly
connected networks and about the connected networks of
their immediate neighbors.
ƒ Continuing the journey toward convergence, the routers
exchange the next round of periodic updates.
ƒ Each router again checks the updates for new information.
18
4.2.3 Exchange of Routing Information
19
4.2.4 Convergence
ƒ Router convergence is reached when
-All routing tables in the network contain the same network information
ƒ Routers continue to exchange routing information
-If no new information is found then Convergence is reached
20
4.2.4 Convergence
ƒ Convergence must be reached before a network is considered completely operable.
ƒ Speed of achieving convergence consists of 2 interdependent categories:
-Speed of propagate/broadcasting routing information
-Speed of calculating routes
ƒ Turn to flash: a branch router in Region 4 (B2-R4) is cold starting, It takes five rounds of
periodic update intervals before most of the branch routers in Regions 1, 2, and 3 learn
about the new routes advertised by B2-R4.
ƒ 直径
21
4.3 Routing Table Maintenance
22
4.3.1 Periodic Updates: RIPv1 & IGRP
ƒ Periodic Updates : RIPv1 & IGRP flash
–These are time intervals in which a router sends out its entire routing
table.
ƒ A topology changes may occur for several reasons, including:
–Failure of a link
–Introduction of a new link
–Failure of a router
–Change of link parameters
23
4.3.1 Periodic Updates: RIPv1 & IGRP
ƒ RIP uses 4 timers 4.3.1.2
–Update timer 更新
–Invalid timer 无效
–Holddown timer 抑制
–Flush timer 清除
24
RIP Timers
NoStill
update
no update
for 10.4.0.0
for 10.4.0.0
from R3
from
received,
R3 received.
markRemove
route asthis
“possibly
route fromdown”,
the routing
but leave
table.
in
routing table.
Periodic
Update
Periodic Update
S0/0/1
IOS implements three additional timers for RIP.
z Update timer: 30 seconds.
z 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.
y Route still is in routing table.
z Flush Timer: 240 seconds (default)
y When the flush timer expires, the route is removed from the routing
table.
z Hold-down Timer: 180 seconds (default)
y 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
z RIP timer values can be verified with two commands: show ip
route and show ip protocols.
4.3.2 Bounded Updates: EIGRP
ƒ EIGRP :Bounded Updates(有限/限定 更新)
ƒ EIRPG routing updates are
- Partial updates
- Triggered by topology changes
- Bounded
- Non periodic
27
4.3.3 Triggered Updates
ƒ 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. The detecting router immediately sends an update
message to adjacent routers.
ƒ Conditions in which triggered updates are sent:
- Interface changes state(up or down)
- Route becomes unreachable
- Route is placed in routing table
ƒ Triggered updates + Periodic Updates flash 4.3.3
28
4.3.4 Random Jitter (随机抖动)
ƒ Synchronized updates:同步更新 flash 4.3.4
–只有集线器才会发生此类冲突,交换机不存在此问题。
–A condition where multiple routers on multi access LAN segments
transmit routing updates at the same time.
–Problems with synchronized updates
• Bandwidth consumption
• Packet collisions
–Solution to problems with synchronized updates
• Used of random variable called RIP_JITTER (0%-15%), subtracts it
–In this way, the update interval varies randomly in a range from 25 to
30 seconds for the default 30-second interval.
29
4.4 Routing Loops
30
4.4.1 Definition and Implication
ƒ What is 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.
ƒ Routing loops may be caused by:
– Incorrectly configured static routes
– Incorrectly configured route redistribution
– Slow convergence
– Incorrectly configured discard routes
31
4.4.1 Definition and Implication
ƒ Routing loops can create the following issues:
– Excess use of bandwidth
– CPU resources may be strained
– Network convergence is degraded
– Routing updates may be lost or not processed in a timely manner
ƒ There are a number of mechanisms available to eliminate routing
loops:
– Defining a maximum metric to prevent count to infinity
– Holddown timers
– Split horizon
– Route poisoning or poison reverse
(路由毒化或毒性反转)
– Triggered updates
32
4.4.2 Problem: Count to Infinity
4.4.2 flash
33
4.4.2 Problem: Count to Infinity
34
4.4.3 Setting a Maximum
This is a routing loop whereby packets bounce
infinitely around a network.
35
4.4.3 Setting a maximum
ƒ Distance Vector routing protocols set a specified metric value to indicate
infinity
ƒ Once a router “counts to infinity” it marks the route as unreachable
ƒ For example, RIP defines infinity as 16 hops - an "unreachable" metric.
36
4.4.4 Preventing loops with holddown timers
ƒ Holddown timers are used to prevent regular update messages from
inappropriately reinstating a route that may have gone bad.
ƒ 抑制计时器可用来防止定期更新消息错误地恢复某条可能已经发生故障的
路由。4.4.4 flash good
ƒ Holddown timers also help prevent the count to infinity condition.
ƒ Holddown timers work in the following way: (detail to next)
1. A router receives an update from a neighbor indicating that a network that
previously was accessible is now no longer accessible.
2. The router marks the network as possibly down and starts the holddown
timer.
3. If an update with a better metric for that network is received from any
neighboring router during the holddown period, the network is reinstated and
the holddown timer is removed.
Should Same metric for same neignor, then reinstated.
4. If an update from any other neighbor is received during the holddown 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 propagated.
5. Routers still forward packets to destination networks that are marked as
possibly down. This allows the router to overcome any issues associated with
intermittent connectivity. If the destination network truly is unavailable and the
packets are forwarded, black hole routing is created and lasts until the
holddown timer expires.
37
Preventing Routing Loops with
Hold-Down Timers
z A routing loop could also be created by a periodic update that is
sent by the routers during the instability.
z Hold-down timers:
y Prevent routing loops from being created by these conditions.
Preventing Routing Loops with Hold-Down Timers
Update timer
not yet expired
X
Triggered Update
S0/0/1
z Network 10.4.0.0 attached to R3 goes down.
z R3 sends a triggered update.
Preventing Routing Loops with Hold-Down Timers
X
Triggered Update
S0/0/1
Possibly down - Start Hold-down Timer
z R2 receives the update from R3 indicating that network 10.4.0.0 is now no
longer accessible.
z R2 marks the network as possibly down and starts the hold-down timer.
Preventing Routing Loops with Hold-Down Timers
X
Triggered Update
S0/0/1
Possibly down - Start Hold-down Timer
Update with
better metric
z 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.
z Note: In this example their can’t be a better metric than 1 hop.
Preventing Routing Loops with Hold-Down Timers
X
Update with worse metric:
10.4.0.0 3 hops
S0/0/1
Possibly
Same or down
worse- metric
Start Hold-down
- Still possibly
Timer
down - Keep
Hold-down Timer going
z 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.
z Thus, more time is allowed for the information about the change to be
propagated.
Preventing Routing Loops with Hold-Down Timers
X
IP Packet: DA 10.4.1.1
S0/0/1
Possibly down
Possibly down
z R1 and R2 still forward packets to 10.4.0.0, even though it is marked as
possibly down.
z This allows the router to overcome any issues associated with intermittent
connectivity. (间歇性连接)
z 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.
Preventing Routing Loops with Hold-Down Timers
Expires
Expires
X
S0/0/1
Possibly down
Possibly down
z When the hold-down timers expire on R1 and R2, 10.4.0.0 is removed
from the routing table.
z No traffic to 10.4.0.0 will be routed – packets dropped by each router.
4.4.5 Split horizon rule
ƒ The Split Horizon Rule is used to prevent routing loops
ƒ Split Horizon rule:
–A router should not advertise a network through the interface from which
the update came.
ƒ Flash 4.4.5
45
Note on Split Horizon
X
10.1.0.0 Update
10.1.0.0 Update
10.1.0.0 Update
S0/0/1
z Distance vector routing protocols typically implement a technique known as
split horizon.
y Prevents information from being sent out the same interface from which
it was received.
z More later
4.4.6 Split Horizon with poison reverse or Route Poisoning
Route poisoning毒化 is used to mark the route
as unreachable in a routing update that is sent
to other routers.
Route poisoning speeds up the convergence
process as the information about 10.4.0.0
spreads through the network more quickly than
waiting for the hop count to reach "infinity".
Flash 4.4.6.1
47
4.4.6 Split Horizon with poison reverse or Route Poisoning
ƒ Split horizon with poison reverse: (毒性反转/加速收敛)
ƒ The rule states that once a router learns of an unreachable route through an interface,
advertise it as unreachable back through the same interface. Flash detail to 4.4.6.2
ƒ Poison reverse is a specific circumstance that overrides split horizon. It occurs to
ensure that R3 is not susceptible to incorrect updates about network 10.4.0.0.
ƒ 毒性反转非常特殊,它会使路由器忽略水平分割规则的要求。它的作用在于确保 R3
不会轻易受到有关网络 10.4.0.0 的错误更新的影响。
48
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.
ƒ How the TTL field works
–With TTL, the 8-bit field is set with a value by the source device of the packet.
–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.
49
6
ƒ Refer to the exhibit.The network shown in the exhibit is running the RIPv2 routing
protocol.The network has converged,and the routers in this network are
functioning properly .The FastEthernet0/0 interface on R1 goes down.In which two
ways will the routers in this network respond to this change?(choose two)
– A. R1 will send LSAs to R2 and R3 informing them of this change, and then all
routers will send periodic updates at an increased rate until the network again
converges.
–B. Because of the split-horizon rule, router R2 will be prevented from sending
erroneous information to R1 about connectivity to the 192.168.1.0 network.
–C. When router R2 learns from R1 that the link to the 192.168.1.0 network has
been lost, R2 will respond by sending a route back to R1 with an infinite metric
to the network.
–D. Routers R2 and R3 mark the route as inaccessible and will not accept any
further routing updates from R1 until their hold-down timers expire.
–E. All routers will reference their topology database to determine if any backup
routes to the 192.168.1.0 network are known.
B,C
50
4.5 Distance Vector Routing Protocols Today
51
4.5.1 RIP and EIGRP
ƒ Factors used to determine whether to use RIP or EIGRP include
- Network size
- Compatibility between models of routers
- Administrative knowledge
52
4.5.1 RIP and EIGRP
ƒ RIP
ƒFeatures of RIP:
-Supports split horizon & split horizon with
poison reverse
-Capable of load balancing: up to six equal cost paths
-Easy to configure
-Works in a multi vendor router environment
53
4.5.1 RIP and EIGRP
ƒ Features of EIGRP:
–Triggered updates
–EIGRP hello protocol used to establish neighbor
adjacencies
–Supports VLSM & route summarization
–Use of topology table to maintain all routes
–Classless distance vector routing protocol
–Cisco proprietary protocol
–Bounded updates mean that EIGRP uses less
bandwidth, especially in large networks with many
routes.
54
Summary
ƒ Characteristics of Distance Vector routing protocols
–Periodic updates
–RIP routing updates include the entire routing table
–Neighbors are defined as routers that share a link and are configured to
use the same protocol
ƒ The network discovery process for D.V. routing protocol
–Directly connected routes are placed in routing table 1st
–If a routing protocol is configured then
•Routers will exchange routing information
–Convergence is reached when all network routers have the
– same network information
ƒ D.V. routing protocols maintains routing tables by
–RIP sending out periodic updates
–RIP using 4 different timers to ensure information is accurate and
convergence is achieved in a timely manner
–EIGRP sending out triggered updates
55
Summary
ƒ D.V. routing protocols may be prone to routing loops
– routing loops are a condition in which packets continuously traverse a
network
–Mechanisms used to minimize routing loops include defining maximum
hop count, holddown timers, split horizon, route poisoning and triggered
updates
ƒ Conditions that can lead to routing loops include
–Incorrectly configured static routes
–Incorrectly configured route redistribution
–Slow convergence
–Incorrectly configured discard routes
ƒ How routing loops can impact network performance includes:
–Excess use of bandwidth
–CPU resources may be strained
–Network convergence is degraded
–Routing updates may be lost or not processed
56
Summary
ƒ Routing Information Protocol (RIP)
–A distance vector protocol that has 2 versions
– RIPv1 – a classful routing protocol
– RIPv2 - a classless routing protocol
ƒ Enhanced Interior Gateway Routing Protocol (EIGRP)
–A distance vector routing protocols that has some features of
link state routing protocols
–A Cisco proprietary routing protocol
57
Quiz
ƒ2
ƒ 5 4.3.1.2
ƒ 11 good
ƒ 7 4.4.4 ***
ƒ9
58
Lab(下次找同学演示)
ƒ 4.7.1: Packet Tracer 综合技巧练习(1班&2班)
59
60
Download