Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNP) > Discussions

_Communities

4787 Views 20 Replies Latest reply: Mar 10, 2012 8:27 PM by Brian McGahan - 4 x CCIE, CCDE RSS 1 2 Previous Next

Currently Being Moderated

The truth about EIGRP FD Calculation

Feb 25, 2012 11:25 PM

dmorrow 20 posts since
Jul 27, 2008

This is a contradiction I could not get my head around until now. The comment below was taken below from Diane Teare's latest CCNP route books for the 642-902, the same is said across a number other books.

 

Basically the quote below says the FD is calculated based on the sum of the next hop routers AD and the cost between local router and next hop router. However as you read on through the book it says the metric is calculated using the EIGRP metric calculation. To simplifiy things for now lets just say metric= least cost bw + accumulative delay

 

CCNP Quote:

 

Advertised distance and feasible distance—DUAL uses distance information, known as a metric or cost, to select efficient, loop-free paths. The lowest-cost route is calculated by adding the cost between the next-hop router and the destination—referred to as the advertised distance (AD)—to the cost between the local router and the next-hop router. The sum of these costs is referred to as the feasible distance (FD).

 

The former appears not to work as I don't get the correct FD value by adding local metric to next hop routers AD, unless I also subtract 256. I do however get the correct FD value from the metric formula.

 

Here is my Topology which is taken from the CCNP Route LAB manual LAB 2-1

 

(R1)--fa0/0 <-- 100Mbps --> fa0/0-(R3)--loopback3 <--> 10Gbps

 

(R1)--fa0/0 = 10.1.100.1/24

(R3)--fa0/0 = 10.1.100.3/24

(R3)--Loopback3 = 10.1.3.1/24

 

I'm going to calculate the FD for 10.1.3.0/24 from R1 perspective using the first scenario FD = AD + Local Router to Next Hop Router metric

 

R1#sh ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(10.1.1.1)

 

P 10.1.3.0/24, 1 successors, FD is 409600
        via 10.1.100.3 (409600/128256), FastEthernet0/0

P 10.1.100.0/24, 1 successors, FD is 281600

        via Connected, FastEthernet0/0

 

Ok so now we calculate the FD by adding the AD for 10.1.3.0/24 via 10.1.100.3 and FD for 10.1.100.0/24 connected local therefore FD = 128256 + 281600 = 409856.

 

hmm.. 409856 does not match the FD shown by the show ip eigrp topology output as this shows the FD as 409600, there is a difference of 256.

I tried this same calculation on other routes and seem to get a difference of 256. Perhaps the calculation needs to be FD = 128256 + 281600 - 256 =  409600

 

So now I'll use the metric formula, but first I'll display the metrics needed for this calculation. Note: the min bandwidth is the 100Mbps (10000Kbps) on fa0/0 as shown below and the delay on fa0/0, the delay on loopback 3 at R3 is 5000 microseconds, therefore the cumulative delay is 6000 microseconds as shown directly  below.

 

R1#sh ip eigrp topology 10.1.3.0/24

IP-EIGRP (AS 1): Topology entry for 10.1.3.0/24

  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 409600

  Routing Descriptor Blocks:

  10.1.100.3 (FastEthernet0/0), from 10.1.100.3, Send flag is 0x0

      Composite metric is (409600/128256), Route is Internal

      Vector metric:

        Minimum bandwidth is 10000 Kbit

        Total delay is 6000 microseconds

        Reliability is 255/255

        Load is 1/255

        Minimum MTU is 1500

        Hop count is 1

 

Outputs below provided as added information to prove the outpu above is true.

 

R1#sh ip eigrp topology 10.1.100.0/24

IP-EIGRP (AS 1): Topology entry for 10.1.100.0/24

  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 281600

  Routing Descriptor Blocks:

  0.0.0.0 (FastEthernet0/0), from Connected, Send flag is 0x0

      Composite metric is (281600/0), Route is Internal

      Vector metric:

        Minimum bandwidth is 10000 Kbit

        Total delay is 1000 microseconds

        Reliability is 255/255

        Load is 1/255

        Minimum MTU is 1500

        Hop count is 0

 

R3#sh ip eigrp topology 10.1.3.0/24

IP-EIGRP (AS 1): Topology entry for 10.1.3.0/24

  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 128256

  Routing Descriptor Blocks:

  0.0.0.0 (Loopback3), from Connected, Send flag is 0x0

      Composite metric is (128256/0), Route is Internal

      Vector metric:

        Minimum bandwidth is 10000000 Kbit

        Total delay is 5000 microseconds

        Reliability is 255/255

        Load is 1/255

        Minimum MTU is 1514

        Hop count is 0

 

Now to calculate using the metric formula; metric = ((1E7/minbw)+(sum of delays/10ths of microseconds))*256

 

metric = ((10000000/10000)+(600))*256 = 409600

 

So the formula matches the FD shown in the topology output.

 

R1#sh ip eigrp topology 10.1.3.0/24

IP-EIGRP (AS 1): Topology entry for 10.1.3.0/24

State is Passive, Query origin flag is 1, 1 Successor(s), FD is 409600

Routing Descriptor Blocks:

10.1.100.3 (FastEthernet0/0), from 10.1.100.3, Send flag is 0x0

Composite metric is (409600/128256), Route is Internal

Vector metric:

Minimum bandwidth is 10000 Kbit

Total delay is 6000 microseconds

Reliability is 255/255

Load is 1/255

Minimum MTU is 1500

Hop count is 1

 

I'm interested in anyone's view on the reasoning behind the said quote above because it does'nt appear to be right if taken literally, it might be true if you subtract 256. Can anyone confirm possible reasons for the difference of 256?

 

Perhaps the AD is not used in the FD calculation for a given route and is only used as the selector for Feasible Successors etc.. not sure.

 

The EIGRP formula matches the FD as expected.

 

 

thanks DM

  • Martin 13,075 posts since
    Jan 16, 2009
  • lp4nb 520 posts since
    Jun 27, 2009
    Currently Being Moderated
    3. Feb 25, 2012 11:22 PM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

      L0-    6.6.6.0/24 (BW-10000000)

                           \                                                                          R2 (BW 1544)

                             \                                                                          /^

                                ----R6--f0/0---(BW- 10000)-- R1- --s0/0.12/21---/

                              /                                                (1.1.1.0/24)

                            /

      L1-    6.6.7.0 /24 (BW-5000000)

     

     

     

     

    Case 1.

    ------

     

     

    Only BW is used in metric calculation. K-values- 1 0 0 0 0 )

     

     

    R6

    --

     

     

    R6(config)#do sh ip ei to 6.6.6.0/24

    IP-EIGRP (AS 1): Topology entry for 6.6.6.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256

      Routing Descriptor Blocks:

      0.0.0.0 (Loopback0), from Connected, Send flag is 0x0

          Composite metric is (256/0), Route is Internal

          Vector metric:

            Minimum bandwidth is 10000000 Kbit

            Total delay is 100 microseconds

            Reliability is 255/255

            Load is 1/255

            Minimum MTU is 1514

            Hop count is 0

     

     

    R6(config)#do sh ip ei to 6.6.7.0/24

    IP-EIGRP (AS 1): Topology entry for 6.6.7.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 512

     

     

     

     

    coming on to R1 first calculate the eigrp metric to reach the next hop.

    metric = (10000000/10000) * 256  = 256000

     

     

    R1(config-router)#do sh ip ei to 10.1.16.0/24

    IP-EIGRP (AS 1): Topology entry for 10.1.16.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256000

      Routing Descriptor Blocks:

      0.0.0.0 (FastEthernet0/0), from Connected, Send flag is 0x0

          Composite metric is (256000/0), Route is Internal

          Vector metric:

            Minimum bandwidth is 10000 Kbit

     

     

     

     

    total metric should be RD  + cost to reach neighbor

     

     

    ie for 6.6.6.0/24------256 + 256000  = 256256

        for 6.6.7.0/24   ---- 512 + 256000 =  256512

     

     

    Or we use the formula [ ((10^7/min bw) + (delay)) * 256 ]

      we get  10^7/10000*256   = 256000

     

     

    verifying-- on CLI

    its 256000

     

     

     

    R1(config-router)#do sh ip ei to 6.6.6.0/24

    IP-EIGRP (AS 1): Topology entry for 6.6.6.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256000

      Routing Descriptor Blocks:

      10.1.16.6 (FastEthernet0/0), from 10.1.16.6, Send flag is 0x0

          Composite metric is (256000/256), Route is Internal

          Vector metric:

            Minimum bandwidth is 10000 Kbit

            Total delay is 1100 microseconds

            Reliability is 255/255

            Load is 1/255

            Minimum MTU is 1500

            Hop count is 1

    R1(config-router)#do sh ip ei to 6.6.7.0/24

    IP-EIGRP (AS 1): Topology entry for 6.6.7.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256000

      Routing Descriptor Blocks:

      10.1.16.6 (FastEthernet0/0), from 10.1.16.6, Send flag is 0x0

          Composite metric is (256000/512), Route is Internal

          Vector metric:

            Minimum bandwidth is 10000 Kbit

            Total delay is 6000 microseconds

            Reliability is 255/255

            Load is 1/255

            Minimum MTU is 1500

            Hop count is 1

     

     

    I guess there's no use to go to R2 and verify things, as the minimum BW will be

    1544 for R2 and the metric will be 6467*256=1657856

    ie the metric to reach R1 is equal to metric to reach R6.

     

     

    verifying:-

     

     

    R2(config-router)#do sh ip ei to 6.6.7.0/24

    IP-EIGRP (AS 1): Topology entry for 6.6.7.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 1657856

      Routing Descriptor Blocks:

      10.1.12.1 (Serial0/0.21), from 10.1.12.1, Send flag is 0x0

          Composite metric is (1657856/256000), Route is Internal

          Vector metric:

            Minimum bandwidth is 1544 Kbit

    R2(config-router)#do sh ip ei to 1.1.1.0/24

    IP-EIGRP (AS 1): Topology entry for 1.1.1.0/24

      State is Passive, Query origin flag is 1, 1 Successor(s), FD is 1657856

      Routing Descriptor Blocks:

      10.1.12.1 (Serial0/0.21), from 10.1.12.1, Send flag is 0x0

          Composite metric is (1657856/256), Route is Internal

          Vector metric:

            Minimum bandwidth is 1544 Kbit

     

     

     

     

    So, it don't looks like the FD is equal to metric to neighbor + its best metric to destination.

     

     

     

     

     

     

     

     

    Case 2:

    -------

     

     

      L0-    6.6.6.0/24 (DLY- 10)

                           \                                                                                   R2 (DLY 2000)

                             \                                                                                      /^

                                ----R6--f0/0---(DLY 1000)-- R1- --s0/0.12/21---/

                              /                                                (1.1.1.0/24)

                            /

      L1-    6.6.7.0 /24 (DLY-100)

    Delay is NOT in tens of microsec

     

     

    K values-  0 0 1 0 0

     

     

    here we can say that the metric to reach the neighbor + the RD by the neighbor is equal to FD, as the delay is cumulative, and there is no MIN BW factor here.

     

     

     

     

    CASE-3-- K values-- 10100

    same as your post but not identical

     

     

     

     

    When i learned the metric I had the same question, but i couldn't find any reason anywhere.

    even if you see debugs like following:

    The debug

     

     

    *Mar  1 05:23:54.194: IP-EIGRP(Default-IP-Routing-Table:1): Int 12.1.1.0/24 M 2067456 - 1657856 409600 SM 409600 - 256000 153600

     

    where metric M equals 2067456  (which is sum of min.BW*256  = 1657856), (cumulative delay * 256 = 409600)

    same for the Source Metric  SM - 409600  that = 256(min BW) + 256 *(total delay)

                                                   409600      =         256000      +   153600 

     

     

    That too only support the formula based metric calculation.

     

     

    Regards

  • lp4nb 520 posts since
    Jun 27, 2009
    Currently Being Moderated
    5. Feb 26, 2012 12:10 AM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

    I had tried earlier the difference changes. :-)

    and what Martin indicated in post 3 I thought the same way about it, but couldn't decipher which one  to round off, the  RD or the local metric to Neighbor, or the one when we use (10^7/BW).

    The problem is this thing is propritary and I think that is the reason it is not documented in detail. Or I'm missing sth.

     

    Regards

     

    P.S though, I still can't comment on the contradiction (original Question).

  • Brian 2,971 posts since
    Aug 17, 2009
    Currently Being Moderated
    7. Feb 26, 2012 6:52 AM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

    You are correct, there is definitely a  misunderstanding in "how" the EIGRP is truly calculated.  In fact, I wrote a little PDF document describing this same issue some time ago, but thought it needed editing before I posted it for others.  You can read it here:

     

    https://learningnetwork.cisco.com/docs/DOC-13825

     

    Regarding the "rounding", yes Cisco routers will round down or "truncate" the decimal portion on the calculations.  For example, take a serial link with a bandwidth of 1544 and delay of 20000 microseconds.  Using the formula without rounding yields the following EIGRP metric.

     

    METRIC = 256 * [(10,000,000/1544) + (20000/10)]

    METRIC = 256 * [(6476.68) + (2000)]

    METRIC = 256 * (8476.68)

    METRIC = 2,170,031.09

     

    when in fact the true EIGRP metric is 2,169,856.  Indicating the router rounded down or "truncated" the decimal portion and used 6476 rather than 6476.68.  You can verify this on any Cisco router as well.

     

    Hope this helps.

     

    Brian

  • Brian 2,971 posts since
    Aug 17, 2009
    Currently Being Moderated
    10. Feb 27, 2012 5:26 AM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

    Dmorrow,

     

    Very nice labbing.  However, I do not get the same 256,000 difference in all three topologies.  Lets take your first topology.

     

    R2 to destination network = 40642560

    R1 to R2 metric = 28160

    adding these two together

     

    40642560

    00028160

    40670720

     

    However, the correct metric = 40645120

     

    the difference is

     

    40670720

    40645120

    00025600

     

    difference = 25,600

     

    Take topology #2.

     

    R2 to destination network = 40642560

    R1 to R2 metric = 258560

    adding these two together

     

    40642560

    00258560

    40901120

     

    However, the correct metric = 40645120

     

    the difference is

     

    40901120

    40645120

    00256000

     

    difference = 256,000

     

    Take topology #3.

     

    R2 to destination network = 5642496

    R1 to R2 metric = 28160

    adding these two together

     

    5642496

    0028160

    5670656

     

    However, the correct metric = 5645056

     

    the difference is

     

    5670656

    5645056

    0025600

     

    difference of 25,600

     

    So you do not have the same 256,000 in all cases.  Again from my paper, the only way to calculate the correct EIGRP metric is by using the formula.

     

    Regarding the rounding issue, this occurs in the router when you determine the BW.  Recall from the formula,

     

    BW = (10,000,000 / interface bandwidth)

     

    If we have an interface bandwidth of say T1 (1544kbps) with a default delay of 20,000 microseonds.  We would get the following metric (no rounding).

     

    BW = (10,000,000 / 1544) = 6476.68394

    Delay = 20,000 / 10 = 2000

     

    Metric = 256 (BW + Delay)

    Metric = 256 (8476.68394)

    Metric = 2170031.09

     

    but this is incorrect.  The correct metric is

     

    BW = (10,000,000 / 1544) = 6476  <---rounded down

    Delay = 20,000 / 10 = 2000

     

    Metric = 256 (BW + Delay)

    Metric = 256 (8476)

    Metric = 2169856

     

    This was really fun and I am glad you learned some valuable information.

     

    Brian

  • Martin 13,075 posts since
    Jan 16, 2009
    Currently Being Moderated
    11. Feb 27, 2012 10:45 AM (in response to Brian)
    Re: The truth about EIGRP FD Calculation

    Brian is right, again; (nothing new here, right ?)

    Strange but Metric is not done the way CCNP books say it does or the way we interpret it.

     

    i did some testing on my own, will post results later today;

  • Brian 2,971 posts since
    Aug 17, 2009
    Currently Being Moderated
    13. Feb 28, 2012 3:58 AM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

    I think you may be confused on the "rounding".  The rounding happens within the EIGRP calculation when you try and find the value for BW.  Recall:

     

    BW = (10,000,000 / interface bandwidth)

     

    It is in this calculation that you will often find a decimal portion such as in T1 and fractional T1 circuits (10^7 / 1544) or (10^7 / 64)  these produce non integer values.

     

    In regards to the Topology #2 example, I do not recall anyone mentioning that the value 40901120 is rounded down to 40645120.

     

    The fact that your examples show a pattern regarding 256 times some multiple of ten, is purely coincidental.  Take for instance this topology:

     

    R1 <---1544kbps---> R2 <---64kbps---> R3 <---100Mbps---> 10.1.1.0/24

     

    Delays:
    R1 to R2 = 20,000 microseconds
    R2 to R3 = 20,000 microseconds
    R3 to 10.1.1.0/24 = 100 microseconds

     

    The individual link metrics are as follows:

    R1 to R2 = 2169856
    R2 to R3 = 40512000
    R3 to 10.1.1.0/24 = 28160

     

    I will leave the math to you to verify.  The advertised metric to the destination network 10.1.1.0/24 from R2 is its FD to the destination network.  In this case, we can calculate a Metric of 40514560 using the EIGRP formula.

     

    Now if we take the case in the book where it says you "add" the advertised distance (AD) of the upstream neighbor to the cost to reach the next-hop neighbor.  We get the following metric:

     

    Metric = (metric of R1 to R2) + (R2's AD) = 2169856 + 40514560 = 42,684,416

     

    However, the true metric is 41,026,560.  For a difference of

     

    42,684,416 - 41,026,560 = 1,657,856.

     

    So, clearly not related to 256 times some multiple of ten you were getting.

     

    Hope this helps.

     

    Brian

  • lp4nb 520 posts since
    Jun 27, 2009
    Currently Being Moderated
    14. Feb 28, 2012 4:42 AM (in response to dmorrow)
    Re: The truth about EIGRP FD Calculation

    Its just that the Routers don't do any floating point math when calculating the EIGRP metric.

    Regards

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)