EIGRP metrics and best path calculation.
So im finishing up some troubleshooting exercises in Routing TCP/IP. They are mainly about the metrics used by EIGPR. Here’s a review of the functionality of EIGRP and how it chooses the best path to a destination.
First of, EIGRP is an Enhancement of the proprietary IGRP protocol, which is almost but phased out by now. EIGRP is still a distance vector protocol, since it routes by rumor. Each router does not have a full view of the entire network topology and can therefor not base any decision on
Lets nail down how the metric itself is calculated:
EIGRP (and IGRP for that matter) is based on a range of values. Bandwidth, load, delay, reliability and MTU. This is called a composite metric. Each of these are called a K-value. K1=Bandwidth, K2=Load, K3=Delay, K4=Reliability, K5=MTU. At the moment, only Bandwidth and Delay has any influence in the composite metric. Therefor K1=K3=1.
The bandwidth in this calculation, is the minimum bandwidth along the path. The delay is the cummulative delay along the entire path.
The bandwidth is inverse to 10^7, and the delay is divided by 10.
Lets take an example, here’s the topology:
What we want to calculate here, is the metric from R1 to the subnet 10.10.10.0/30.
First of, whats the minimum bandwidth configured. That would be the serial link between R1 and R2. It is only 56kbits.
Lets jot that one down:
Bw = 56 = 10^7/56 = ~178571.
Next up is the delay: 20000 + 7000 + 1000 = 28000, out delay is then:
Dly = 28000 / 10 = 2800.
To get the total metric, we add these two numbers: 178571 + 2800 = 181371. Now EIGRP multiplies the metric by 256, so we get: 46430976.
This is our total metric from R1 to the net 10.10.10.0/30.
Now some terms that used in the EIGRP lingo.
Advertised distance = The metric as reported by a neighbor.
Feassible distance = The metric currently used as the best path.
Successor = The next hop router currently used by this router.
Feassible successor = A next hop router that can immediately be used if the primary (successor) fails.
Feasibility Condition = A condition that states that an advertised distance must be less than the current feassible distance.
To choose a successor, which is basically the path (vector) to use for next hop. The router chooses the advertised distance from each neighbor + the local link metric, and the best one wins. Simple enough. Besides this, if any advertised distance meets the feasibility condition (advertised distance < feasible distance), it will be entered into the topology table as a feasible successor.
Now I mentioned the topology table, this is the table of sucessors along with feassible succesors for each route. There’s also a neighbor table, which lists the routers immediate neighbors (next to on data-link).
When everything is stable and fully converged, a route is said to be in a passive state. If something happens, a local computation occurs. If the router has a feassible successor, this one is choosen immediately, and everything is again stable. The router never puts the route into active. If the router does not have a feassible successor, heaven and earth is set into motion. The router puts the route into an active state, queries are sent to search for a better route to this destination/route. If the neighboring router doesnt have a feassible successor, it will also send out queries. When all replies have been received by all routers, the destination/route is put into the passive state (if a route can be reached at all).
A quick note about timers and adjacencies about EIGRP.
Hello’s = On broadcast networks, the hello timer is every 5 seconds. On serial links and links slower than T1, the hello’s are sent every 60 seconds.
Hold Downs = Set to 3 times the hello interval. This means 15 seconds for broadcast and 180 on serial links and slower than T1 links.
An adjacency is defined as two EIGRP speaking routers sharing the same data-link, with common required attributes. Common attributes are the K-values and the subnet, along with authentication options.
The last thing I want to mention is the SIA (Stuck In Active) concept. It is a theoretical concept that queries sent out to neighbors are further replicated downstream to other routers, which again send them further because they dont have a different feasible successor. There’s a timer called the active timer, which is set to 3 minutes. If the router does not receive a reply within that period, it is declared SIA, the route is tagged unreachable from that neighbor, and the neighbor is declared dead. This will cause all routes from which the neighbor is the next hop, to be declared unreachable, causing the route to be locally computed again and maybe causes the other routes to be set into the active state, and queried itself. This can cause a slow convergence of multiple routes. There are two extra types of packets that EIGRP uses. The SIA query and SIA reply. After 90 seconds a SIA query is sent from the originating router, to make sure its still “alive” on that route, the neighbor router then further propagates this query. If the SIA reply is received, the router wont be declared dead for 3 times the SIA query is sent out, making the other network routes more stable by not putting them into active. The total time a router can be “held up”, is then 6 minutes (90 seconds before first SIA query, another 90 before the next, and another 90), all in all 6 minutes. This is push come to shove, and hopefully a well designed network wont take that long to converge.
I hope some of this info is of use to somebody, but at least it made me rethink everything 🙂