Tải bản đầy đủ (.pdf) (10 trang)

CCNA 1 and 2 Companion Guide, Revised (Cisco Networking Academy Program) part 75 doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (680.66 KB, 10 trang )

1102.book Page 709 Tuesday, May 20, 2003 2:53 PM
Objectives
Upon completion of this chapter, you will be able to
■ Describe initial router configuration
■ Describe RIP characteristics
■ Configure RIP routing
■ Describe IGRP characteristics
■ Configure IGRP routing
■ Describe and test load balancing over multiple paths
1102.book Page 710 Tuesday, May 20, 2003 2:53 PM
Chapter 16
Distance Vector Routing
Protocols
Now that you have learned about routing protocols, you are ready to configure IP routing
protocols. As you know, routers can be configured to use one or more IP routing protocols.
In this chapter, you learn the initial configuration of the router to enable the Routing
Information Protocol (RIP) and the Interior Gateway Routing Protocol (IGRP). In addition,
you learn how to monitor IP routing protocols.
Please be sure to look at this chapter’s associated e-Labs, Videos, and PhotoZooms that
you will find on the CD-ROM accompanying this book. These CD elements are designed
to supplement the material and reinforce the concepts introduced in this chapter.
Initial Router Configuration
After testing the hardware and loading the Cisco IOS Software image, the router finds
and applies the configuration statements. These entries provide the router with details
about router-specific attributes, protocol functions, and interface addresses. Remember
that if the router cannot locate a valid startup-config file, it enters an initial router config-
uration mode called setup mode or system configuration dialog.
With the setup mode command facility, you can answer questions in the system configu-
ration dialog. This facility prompts you for basic configuration information. The answers
that you enter enable the router to build a sufficient but minimal router configuration.
The setup facility provides the following:


■ An inventory of interfaces
■ An opportunity to enter global parameters
■ An opportunity to enter interface parameters
■ A setup script review
■ An opportunity to indicate whether or not you want the router to use this
configuration
1102.book Page 711 Tuesday, May 20, 2003 2:53 PM
712 Chapter 16: Distance Vector Routing Protocols
After you confirm setup mode entries, the router uses the entries as a running configu-
ration. The router also stores the configuration in nonvolatile random-access memory
(NVRAM) as a new startup-config, and you can start using the router. For additional
protocol and interface changes, you can then use the enable mode and enter the com-
mand configure.
Distance Vector Routing
This section discusses distance vector routing protocols and their shortcomings, as well
as identifies solutions to the problems presented by distance vector routing. Distance
vector–based routing logarithms pass periodic copies of a routing table from router to
router. These regular updates between routers communicate topology changes.
Maintaining Routing Information Through Distance Vector
Protocols
Routing table updates occur periodically when the topology in a distance vector proto-
col network changes. It is important for a routing protocol to be efficient in updating
the routing tables. As with the network discovery process, topology change updates
proceed systematically from router to router. Figure 16-1 illustrates how distance vector
protocols handle topology changes.
Figure 16-1 Distance Vector Topology Changes
Distance vector algorithms instruct each router to send its entire routing table to each
of its adjacent neighbors. The routing tables include information about the total path
cost, as defined by the metrics, and the logical address of the advertising router on the
path to each network.

B
Process to
Update This
Routing
Table
Router A
Sends
Out This
Updated
Routing
Table
A
Process to
Update This
Routing
Table
Topology
Change
Causes
Routing
Table
Update

chpt_16.fm Page 712 Tuesday, May 27, 2003 2:16 PM
Distance Vector Routing 713
Load Balancing Across Multiple Paths
Load balancing describes the capability of a router to transmit packets to a destination
IP address over multiple paths. Load balancing is a concept that allows a router to take
advantage of multiple paths to a given destination. The paths are derived either stati-
cally or with dynamic protocols, such as RIP, Enhanced IGRP (EIGRP), Open Shortest

Path First (OSPF), and IGRP. Figure 16-2 shows an example of load balancing.
When a router learns of multiple routes to a specific network through multiple routing
processes or routing protocols, it installs the route with the lowest administrative dis-
tance into the routing table. Sometimes, the router must choose from many routes pro-
vided by the same routing process with the same administrative distance. In this case,
the router chooses the path with the lowest cost or metric to the destination. Each
routing process calculates its cost differently, and the costs might need to be manually
configured to achieve load balancing.
If the router receives and installs multiple paths with the same administrative distance
and cost to a destination, load balancing can occur. Cisco IOS Software imposes a six
equal-cost routes limit on the routing table, but some Interior Gateway Protocols (IGPs)
set their own limitations. For example, EIGRP allows up to four equal-cost routes.
By default, most IP routing protocols install a maximum of four parallel routes in a
routing table. Static routes always install six routes. The exception is the exterior rout-
ing protocol Border Gateway Protocol (BGP), which by default allows only one path
to a destination.
The number of maximum paths ranges from one to six paths. To change the maximum
number of parallel paths allowed in a routing table, use the following command while
in router configuration mode:

maximum-paths

maximum
IGRP can load balance up to six unequal links. RIP networks must have the same hop
count to load balance, whereas IGRP uses bandwidth to determine how to load balance.
In Figure 16-2, there are three ways to access Network X:


E to B to A with a metric of 30


■ E to C to A with a metric of 20


E to D to A with a metric of 45
Router E chooses the second path, E to C to A with a metric of 20, which is a lower
cost than 30 and 45. If two or more of the paths had the same metric, load balancing
could occur.

chpt_16.fm Page 713 Tuesday, May 27, 2003 2:16 PM
714 Chapter 16: Distance Vector Routing Protocols
Figure 16-2 Load Balancing
When routing IP, Cisco IOS Software offers two methods of load balancing:


Per-packet load balancing

■ Per-destination load balancing
If process switching is enabled, the router alternates paths on a per-packet basis. If
fast switching is enabled, only one of the alternate routes is cached for the destination
address, so all packets in the packet stream bound for a specific host take the same
path. Packets bound for a different host on the same network might use an alternate
route, in which case traffic is load balanced on a per-destination basis.
How Routing Loops Occur in Distance Vector
Routing loops can occur if a network experiences slow convergence as the result changes
in the network or routing topology causing inconsistent routing entries. Figure 16-3
demonstrates routing loops.
Figure 16-3 Routing Loops
C
D
B

A
E
1
X
Network 1 Unreachable
Alternate Route:
Network 1, Distance 3
Alternate Route: Use
Network 1, Distance 4
Network 1 Down

chpt_16.fm Page 714 Tuesday, May 27, 2003 2:16 PM
Distance Vector Routing 715
The process of how a routing loop occurs (based on Figure 16-3) is as follows:
1.
Just before the failure of Network 1, all routers have consistent knowledge and
correct routing tables. The network is said to have converged. Assume for the
remainder of this example that for Router C, the preferred path to Network 1 is
by way of Router B, and the distance from Router C to Network 1 is three.
2.
When Network 1 fails, Router E sends an update to Router A. Router A stops
routing packets to Network 1, but Routers B, C, and D continue to do so
because they have not yet been informed of the failure. When Router A sends
out its update, Routers B and D stop routing to Network 1. However, Router C
has not received an update. To Router C, Network 1 is still reachable through
Router B.
3.
Now Router C sends a periodic update to Router D, indicating a path to Net-
work 1 by way of Router B. Router D changes its routing table to reflect this
incorrect information, and sends the information to Router A. Router A sends

the information to Routers B and E, and so on. Any packet destined for Network
1 now loops from Router C to B to A to D and back again to C.
Defining a Maximum to Prevent Count to Infinity
The invalid updates of Network 1 continue to loop until some other process stops the
looping. This condition, called count to infinity, loops packets continuously around
the network in spite of the fundamental fact that the destination network, Network 1,
is down. While the routers are counting to infinity, the invalid information allows a
routing loop to exist, as illustrated in Figure 16-4.
Figure 16-4 Counting to Infinity
Without countermeasures to stop the process, the distance vector or the metric of hop
count increases each time the packet passes through another router. Metrics are cov-
ered in Chapter 15, “Routing and Routing Protocols.” These packets loop through the
network because of incorrect information in the routing tables.
C
D
B
A
E
1
X
Network 1, Distance 7
Network 1, Distance 4
Network 1, Distance 6
Network 1, Distance 5
Network 1 Down


chpt_16.fm Page 715 Tuesday, May 27, 2003 2:16 PM
716 Chapter 16: Distance Vector Routing Protocols
Distance vector routing algorithms are self-correcting, but a routing loop problem can

require a count to infinity to resolve. To avoid this prolonged problem, distance vector
protocols define infinity as a specific maximum number. This number refers to a routing
metric, which might simply be the hop count. Figure 16-5 demonstrates this concept.
Figure 16-5 Defining a Maximum Metric
By assigning a maximum number to infinity, the routing protocol permits the routing
loop to continue until the metric exceeds its maximum allowed value. Figure 16-5
shows the metric value as 16 hops, which exceeds the distance vector default maximum
of 15 hops, and the router discards the packet. In any case, when the metric value
exceeds the maximum value, Network 1 is considered unreachable.
Eliminating Routing Loops Through Split Horizon
Another possible source for a routing loop occurs when incorrect information that has
been sent back to a router contradicts the correct information that the router originally
distributed. The following process, as shown in Figure 16-6, explains how this problem
occurs:
1.
Router A passes an update to Router B and Router D indicating that Network 1
is down. However, Router C transmits an update to Router B indicating that
Network 1 is available at a distance of four by way of Router D. This action does
not violate split-horizon rules.
2.
Router B concludes, incorrectly, that Router C still has a valid path to Network 1,
although at a much less favorable metric. Router B sends an update to Router A,
advising Router A of the new route to Network 1.
C
D
B
A
E
1
X

Network 1, Distance 14
Network 1, Distance 15
Network 1, Distance 13
Network 1, Distance 12
Network 1 Down
Routing Table
Maximum metric is 16.
Network 1 is unreachable.

chpt_16.fm Page 716 Tuesday, May 27, 2003 2:16 PM
Distance Vector Routing 717
3. Router A now determines that it can send information to Network 1 by way of
Router B. Router B determines that it can send information to Network 1 by way
of Router C, and Router C determines that it can send information to Network 1
by way of Router D. Any packet introduced into this environment loops between
the routers.
4.
Split horizon attempts to avoid this situation. If a routing update for Network 1
arrives from Router A, then Router B and Router D cannot send information
about Network 1 back to Router A, as in Figure 16-6. Split horizon thus reduces
incorrect routing information and reduces routing overhead.
Figure 16-6 Split Horizon
Route Poisoning
Route poisoning is used by various distance vector protocols to overcome large rout-
ing loops and offer explicit information when a subnet or network is not accessible.
Route poisoning is usually accomplished by setting the hop count to one more than the
maximum.
Poison reverse is another way of avoiding routing loops. Its rule states:
Once you learn of a route through an interface, advertise it as unreachable back
through that same interface.

Assume that the routers in Figure 16-7 have poison reverse enabled. When Router One
learns about Network A from Router Two, it advertises Network A as unreachable
C
D
B
A
E
X
B: Do Not Update
Router A About
Routes to Network 1
D: Do Not Update
Router A About
Routes to Network 1
Network 1 Unreachable
Network 1 Down
1

chpt_16.fm Page 717 Tuesday, May 27, 2003 2:16 PM
718 Chapter 16: Distance Vector Routing Protocols
through its link to Routers Two and Three. Router Three, if it shows any path to Net-
work A through Router One, removes that path because of the unreachable advertise-
ment. EIGRP combines these two rules to help prevent routing loops.
Figure 16-7 Route Poisoning
EIGRP uses split horizon or advertises a route as unreachable when


Two routers are in startup mode (exchanging topology tables for the first time)

■ Advertising a topology table change



Sending a query
When route poisoning is used with triggered updates, it will speed up convergence time
because neighboring routers do not have to wait 30 seconds before advertising the
poisoned route. Route poisoning causes a routing protocol to advertise infinite-metric
routes for a failed route. Route poisoning does not break split-horizon rules. Split
horizon with poison reverse is essentially route poisoning, but specifically placed on
links that split horizon would not normally allow routing information to flow across.
In either case, the result is that failed routes are advertised with infinite metrics.
Avoiding Routing Loops with Triggered Updates
New routing tables are usually sent to neighboring routers on a regular basis. RIP
updates occur every 30 seconds. However, a triggered update is sent immediately in
response to some change in the routing table. The router that detects a topology
change immediately sends an update message to adjacent routers. Those routers then
generate triggered updates, notifying their adjacent neighbors of the change. When a
route fails, an update is sent, rather than waiting on the update timer to expire. The
use of triggered updates, in conjunction with route poisoning, ensures that all routers
know of failed routes before any hold-down timers can expire.

chpt_16.fm Page 718 Tuesday, May 27, 2003 2:16 PM

×