Thursday, May 16, 2013

EIGRP and the variance command.

I think I've finally got a handle on this and wanted to share what I've learned about the variancecommand in particular, but also about successors, feasible successors, and reported distance. It's a long read, but hopefully someone whose trying to understand the EIGRP variancecommand will find this useful. Please reply to this post if you find any mistakes:

Note: In this article, RD (reported distance) means the same thing as AD (advertised distance). You may come across one or the other in books or on web sites.


Capture.JPG

By default, in order to load-balance over different paths, the metrics of those paths must matchexactly.In the network shown above, all bandwidth and delay settings were identical across both paths. I then went into R4 and changed the delay on s0/2 to 2001 (the default is 2000, or 20000 usec). When I did that, R1 would no longer used the path through R4, as the metrics were no longer equal. This proves that EIGRP wants to see metrics that are exactly the same across multiple paths before it will load balance (when not using the variance command).

Use of Variance

When using the variance command, eigrp will add a feasible successor to the route table if the feasible successor has a feasible distance that is less than or equal to the product of the feasible distance of the successor times the variance setting and the feasibility condition is met. In math terms:

FD (of the FS) <= FD (of the S) * variance  

  • FD – feasible distance
  • FS – feasible successor
  • S – successor
For variance to work, the route must already be a feasible successor. A route becomes a feasible successor by meeting the feasibility condition. Then, if variance is configured and the variance logic is met, the route is added to the routing table (this is explained in more detail later). When we say "the variance logic is met", we mean that the FD of the FS is less than or equal to the product of the successor's FD*variance-value (the value configured with thevariance command):
The feasibility condition states that the reported distance (RD) of a route must be less than the feasible distance of the current successor route (the feasible successor). In other words, in order to become a feasible successor (FS), the reported distance of the feasible successor must be less than the feasible distance of the successor.
RD< FD (of the FS)

To illustrate this, we'll perform all testing from R1's perspective, making changes in the delay settings in R4 only.  With all routers set to their defaults (bandwidth and delay), R1 load balances across both paths to the 10.0.0.0 /8 network:

R1#ship route
D   10.0.0.0/8 [90/2707456] via 192.168.1.2, 00:04:00, Serial0/0
               [90/2707456]via 33.168.30.2, 00:04:00, Serial0/1

R1#showip eigrp top
P10.0.0.0/8, 2 successors, FD is 2707456
        via33.168.30.2 (2707456/2195456), Serial0/1
        via192.168.1.2 (2707456/2195456), Serial0/0
After changing R4 s0/2 to a delay of 3000 (or 30000 usec):
Notice that since the two paths to reach the 10.0.0. /8 network are no longer equal, R1 no longer load balances across both paths (it only has one route to the 10.0.0.0 /8 network, via R2). Also notice that the topology table still has two entries for the 10.0.0.0/8 network, because the reported distance of 2451456 is still less than the feasible distance of the successor route (2707456):
R1#showip route
D   10.0.0.0/8 [90/2707456] via192.168.1.2, 04:43:17, Serial0/0

R1#showip eigrp topology
P10.0.0.0/8, 1 successors, FD is 2707456
        via192.168.1.2 (2707456/2195456),Serial0/0
        via33.168.30.2 (2963456/2451456),Serial0/1

Now, we work with the variance command to force eigrp to load-balance across two unequal-cost paths.
To determine what value to use for the variance command, we first divide the FD of the backup route (FS) by the FD of the successor route:

2963456/2707456= 1.095

Our multiplier is 1.095 (it's greater than 1, so we need to round up to the next whole number, or2.). So, we now go into the eigrp routing process and configure the variance command:

r1(config)#router eigrpx
r1(config-router)#variance 2

This tells EIGRP to take the feasible distance of every successor in the topology table and multiply that value by 2. Now, all feasible successors which are less than or equal to the FD*2 (that's the FD of the successor * 2) will be placed into the route table. Sticking with R1 and its path to the 10.0.0.0 /8 network, we take 2*2707456 (the FD of our successor), which give us 5414912. Now, any backup route (feasible successor) whose FD is less than 5414912 will be placed into the route table (as long as its reported distance is less than the feasible distance of the successor route, which will be explained further in a minute).

So, since the FD of the backup route (2963456) is less than 2*FD of the successor route (2707456*2 or 5414912), AND, the RD of its backup route (2451456)is less than the FD of the successor (2707456), that route is now placed back into the routing table:

R1#
D   10.0.0.0/8 [90/2707456] via 192.168.1.2, 00:00:02, Serial0/0
               [90/2963456]via 33.168.30.2, 00:00:02, Serial0/1

R1#ship eigrp topo
P10.0.0.0/8, 1 successors, FD is 2707456
        via192.168.1.2 (2707456/2195456), Serial0/0
        via33.168.30.2 (2963456/2451456), Serial0/1  → backup route
                     ( FD  /   RD  )

Next, I modified the delay in R4 s0/2 to 4000. Notice what happens (the variance is still set at 2). R1 is no longer load-balancing across R2 and R4, and the topology table no longer has a feasible successor (backup route) listed. Why?  First, in order to view ALL the routes stored inthe topology table (successor, feasible successor , and non-successor routes), use the keyword all-links after the show ip eigrp topology command.

Now, we can see that R1 does know about the path through R4 (via 33.168.30.2). In addition, thebackup route's FD of 3219456 is definitely less than 5414912 that we calculated earlier, so it “should” load balance across the two paths, right? Wrong! The reason R1 is NOT sending traffic across R4 is because the reported distance of the backup route is equal to the FD of the successor route (see highlight in red below). Therefore, it does not meet the feasibility condition (i.e. the RD must be less than the FD of the successor) and will not be considered as a backup route, no matter how high you set the variance value. You could enter the command variance 128 and it would have no effect, because there is no feasible successor in the topology table.

R1#show ip route
D   10.0.0.0/8 [90/2707456] via 192.168.1.2, 00:00:58, Serial0/0

R1#showip eigrp top
P10.0.0.0/8, 1 successors, FD is 2707456
        via192.168.1.2 (2707456/2195456), Serial0/0

R1#show ip eigrp top all-links
IP-EIGRPTopology Table for AS(5)/ID(192.168.1.1)

Codes:P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r- reply Status, s - sia Status

P10.0.0.0/8, 1 successors, FD is 2707456, serno 192
        via192.168.1.2 (2707456/2195456),Serial0/0
        via33.168.30.2 (3219456/2707456),Serial0/1
Related Posts Plugin for WordPress, Blogger...