Open lihongjie0209 opened 4 years ago
Now that these routers are talking to each other, what are they talking about? Their topology tables, of course! EIGRP, unlike RIP and IGRP, does not rely on the routing (or forwarding) table in the router to hold all of the information it needs to operate. Instead, it builds a second table, the topology table, from which it installs routes in the routing table.
Note: As of Cisco IOS versions 12.0T and 12.1, RIP maintains its own database from which it installs routes into the routing table.
To see the basic format of the topology table on a router running EIGRP, issue the show ip eigrp topology command. The topology table contains the information needed to build a set of distances and vectors to each reachable network, including:
Feasible and reported distance are discussed later in this section.
If you have the output of a show ip eigrp topology command from your Cisco device, you can use Cisco CLI Analyzer to display potential issues and fixes. To use Cisco CLI Analyzer, you must have JavaScript enabled.
EIGRP uses the minimum bandwidth on the path to a destination network and the total delay to compute routing metrics. Although you can configure other metrics, we do not recommend it, as it can cause routing loops in your network. The bandwidth and delay metrics are determined from values configured on the interfaces of routers in the path to the destination network.
For instance, in Figure 2 below, Router One is computing the best path to Network A.
It starts with the two advertisements for this network: one through Router Four, with a minimum bandwidth of 56 and a total delay of 2200; and the other through Router Three, with a minimum bandwidth of 128 and a delay of 1200. Router One chooses the path with the lowest metric.
Let us compute the metrics. EIGRP calculates the total metric by scaling the bandwidth and delay metrics. EIGRP uses the following formula to scale the bandwidth:
bandwidth = (10000000/bandwidth(i)) * 256
where bandwidth(i) is the least bandwidth of all outgoing interfaces on the route to the destination network represented in kilobits.
EIGRP uses the following formula to scale the delay:
delay = delay(i) * 256
where delay(i) is the sum of the delays configured on the interfaces, on the route to the destination network, in tens of microseconds. The delay as shown in the show ip eigrp topology or show interface commands is in microseconds, so you must divide by 10 before you use it in this formula. Throughout this paper, we use delay as it is configured and shown on the interface.
EIGRP uses these scaled values to determine the total metric to the network:
Note: These K values should be used after careful planning. Mismatched K values prevent a neighbor relationship from being built, which can cause your network to fail to converge.
Note: If K5 = 0, the formula reduces to Metric = ([k1 bandwidth + (k2 bandwidth)/(256 - load) + k3 delay]) 256.
The default values for K are:
For default behavior, you can simplify the formula as follows:
metric = bandwidth + delay
Cisco routers do not perform floating point math, so at each stage in the calculation, you need to round down to the nearest integer to properly calculate the metrics. In this example, the total cost through Router Four is:
In this example, the total cost through Router Four is:
minimum bandwidth = 56k
total delay = 100 + 100 + 2000 = 2200
[(10000000/56) + 2200] x 256 = (178571 + 2200) x 256 = 180771 x 256 = 46277376
And the total cost through Router Three is:
minimum bandwidth = 128k total delay = 100 + 100 + 1000 = 1200 [(10000000/128) + 1200] x 256 = (78125 + 1200) x 256 = 79325 x 256 = 20307200
So to reach Network A, Router One chooses the route through Router Three.
Note the bandwidth and delay values we used are those configured on the interface through which the router reaches its next hop to the destination network. For example, Router Two advertised Network A with the delay configured on its Ethernet interface; Router Four added the delay configured on its Ethernet, and Router One added the delay configured on its serial.
建立邻居
Neighbor Discovery and Maintenance
To distribute routing information throughout a network, EIGRP uses non-periodic incremental routing updates. That is, EIGRP only sends routing updates about paths that have changed when those paths change.
The basic problem with sending only routing updates is that you may not know when a path through a neighboring router is no longer available. You can not time out routes, expecting to receive a new routing table from your neighbors. EIGRP relies on neighbor relationships to reliably propagate routing table changes throughout the network; two routers become neighbors when they see each other's hello packets on a common network.
EIGRP sends hello packets every 5 seconds on high bandwidth links and every 60 seconds on low bandwidth multipoint links.
The rate at which EIGRP sends hello packets is called the hello interval, and you can adjust it per interface with the ip hello-interval eigrp command. The hold time is the amount of time that a router will consider a neighbor alive without receiving a hello packet. The hold time is typically three times the hello interval, by default, 15 seconds and 180 seconds. You can adjust the hold time with the ip hold-time eigrp command.
Note that if you change the hello interval, the hold time is not automatically adjusted to account for this change - you must manually adjust the hold time to reflect the configured hello interval.
It is possible for two routers to become EIGRP neighbors even though the hello and hold timers do not match. The hold time is included in the hello packets so each neighbor should stay alive even though the hello interval and hold timers do not match.
While there is no direct way of determining what the hello interval is on a router, you can infer it from the output of the show ip eigrp neighbors command on the neighboring router.
If you have the output of a show ip eigrp neighbors command from your Cisco device, you can use Cisco CLI Analyzer to display potential issues and fixes. To use Cisco CLI Analyzer, you must have JavaScript enabled.
The value in the Hold column of the command output should never exceed the hold time, and should never be less than the hold time minus the hello interval (unless, of course, you are losing hello packets). If the Hold column usually ranges between 10 and 15 seconds, the hello interval is 5 seconds and the hold time is 15 seconds. If the Hold column usually has a wider range - between 120 and 180 seconds - the hello interval is 60 seconds and the hold time is 180 seconds. If the numbers do not seem to fit one of the default timer settings, check the interface in question on the neighboring router - the hello and hold timers may have been configured manually.
Note: