1 2 Previous Next 21 Replies Latest reply: Nov 19, 2012 7:31 PM by CCNP_beginner RSS

    EIGRP metric equation

    skcis

      Hi all,

       

      I have seen the following EIGRP equation numerous times in books (Cisco Press - BSCI)/documentation and on Cisco's site:

       

      metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K3 * delay] * [ K5/(reliability + K4)]

       

      We know that the default K values are 0, except for K1 and K3 (BW and delay respectively). The problem I'm having is that if K5 = 0, then doesn't that make the whole equation 0? I might be missing something  here, so please correct me if I'm wrong. And if the above was discussed some where, then please point me to that discussion.

       

      Thanks!

        • 1. Re: EIGRP metric equation
          LeeBrownUSA

          Look at K5 divided by reliability, zero divided by interger, should give you a non-zero value.

           

          metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K 3 * delay] * [ K5/(reliability + K4)]

          • 2. Re: EIGRP metric equation
            DelVonte

            That is the equation, but if K5 is zero, then the term with K5 is not used.

             

            HTH

            DelVonte

            • 3. Re: EIGRP metric equation
              Brian

              Aloha skcis,

               

              You are not going crazy.  If k5 is truely zero then the whole equation reduces to zero.  However, the EIGRP metric formula is "conditional", in that if K5 = 0 then the last term is "1" and thereby reduces the equation to:

               

              metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K 3 * delay]

               

              I have a nice MSexcel calculator under my profile as well as a JAVA calculator on my web site,

               

              http://www.btscomllc.com/calculator6_page.htm

               

              Check them out and give them a try.

               

              HTH

               

              • 4. Re: EIGRP metric equation
                LeeBrownUSA

                I may be missing something but since when in a math equation can you throw out part of it?  Do we have any math wiz's here....;-)

                • 5. Re: EIGRP metric equation
                  DelVonte

                  That is not true. Zero divided by anything is zero. So 0/x with x being any negative or positive number is zero. x/0 is undefined.

                  • 6. Re: EIGRP metric equation
                    DelVonte

                    Brian gives a great explanation here. This is not simply an equation, it is logic based. 

                    • 7. Re: EIGRP metric equation
                      Brian

                      Not a Math wiz, but see my post #3.

                       

                      The EIGRP formula is a "conditional" formula.  And you are correct, 0/X = 0  and then 0 x anything = 0.  So, the EIGRP formula must be "conditional".

                       

                      default k1= k3 = 1 and k2=k4=k5 =0

                       

                      interface parameters

                      ===============

                      bandwidth = 10Mbps

                      delay = 1000 microseconds

                      load = 1

                      reliability = 255

                       

                      calculate the metric

                       

                      metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K 3 * delay] * [ K5/(reliability + K4)]

                       

                      metric = 281600

                       

                      Now set all k values to 1.

                       

                      k1=k2=k3=k4=k5=1

                       

                      interface parameters

                      ===============

                      bandwidth = 10Mbps

                      delay = 1000 microseconds

                      load = 1

                      reliability = 255

                       

                      calculate the metric

                       

                      metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K 3 * delay] * [ K5/(reliability + K4)]

                       

                      metric = 1103

                       

                      HTH

                       

                      • 8. Re: EIGRP metric equation
                        LeeBrownUSA

                        Ok, not a math wiz here either and other than an exam question are any of us using K values other than bandwidth and delay (K1, K3)? 

                         

                        Thanks Brian for a great explanation!

                        • 9. Re: EIGRP metric equation
                          skcis

                          Thank you guys for all your input, especially Brian, LeeBrownUSA, and DelVonte.

                           

                          I don't meant to loop around this discussion, but in OCG ROUTE (and I don't have this at hand now), however I do remember that in the book the formula is as follows:

                          metric = [ K1 * bandwidth + (K2 * bandwidth)/256 - load) + K 3 * delay] !!!+!!! [ K5/(reliability + K4)]

                           

                          So the last term in the bracket with K5 is an addition/+ (I have placed exclaimation around it) . Now if we had K5=0, then the above would make senese for default values. So which formula is correct, the one with last bracket been added/+ or multiplied/*?

                           

                          Thanks in advance!!

                           

                          Andy

                          • 10. Re: EIGRP metric equation
                            Brian

                            No, indeed that last term is "x" or multiplication not addition.

                             

                             

                            From a Cisco document,

                             

                             

                            EIGRP uses these scaled values to determine the total metric to the network:

                             

                             

                            metric = [K1 * bandwidth + (K2 * bandwidth) / (256 − load) + K3 * delay] * [K5 / (reliability + K4)]

                             

                            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.

                             

                             

                            If K5 = 0, the formula reduces to Metric = [k1 * bandwidth + (k2 * bandwidth)/(256 − load) + k3 * delay].

                             

                             

                            Mathematically, this means the last term must be a "1" for the formula to reduce in this manner.  Because of the "If k5 = 0" statement the formula is "conditional".

                             

                             

                            HTH

                             

                            • 11. Re: EIGRP metric equation
                              Alex Presse

                              The OCG guide is wrong. I have the same book and I know exactly what you're talking about. It's actually a known bug in the text - the addendums at ciscopress.com have the list of corrections to our books. I highly recommend periodically downloading the updates and revising your books!

                              • 12. Re: EIGRP metric equation
                                DelVonte

                                Definitely agree with this. The older printings of the OCG contain several pages of typos, all of the corrections are on ciscopress.

                                • 13. Re: EIGRP metric equation
                                  RJ

                                  Hi Skcis,

                                   

                                  As Brian pointed out, the formula is a conditional one (logical). As far as the maths and formula goes, there are certain things which we can assume safely. Just as an example when you try to add a series ((1/n)+(1/n-1)+1), if the value of n is very large then the result approximates to 1. The value would be negligible and can be ignore is a safe assumption.

                                   

                                  Similarly the safe assumption or rule of thumb in EIGRP metric calculation as advocated by Cisco is when K5=0 the formula used is a modified version of the original formula (The last part involving K5 will become 1) . How they come to this assumption is not available as EIGRP is not an IETF standard so no specification is available. So you will have to take it as a rule of thumb and Cisco might have some good reasons to have made that assumption.

                                   

                                  EIGRP uses these scaled values to determine the total metric to the network:

                                  • metric = [K1 * bandwidth + (K2 * bandwidth) / (256 - load) + K3 * delay] * [K5 / (reliability + K4)]

                                  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].

                                   

                                   

                                  Please follow the link below to access the document which shows the section pased above.

                                   

                                  http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094cb7.shtml#eigrpmetrics

                                   

                                  Also read this article from ipexpert which gives more information about the K values of what it is and what it is not.

                                   

                                  http://blog.ipexpert.com/2010/03/03/eigrp-metric-k-values/

                                   

                                  Cheers!!

                                  RJ

                                  • 14. Re: EIGRP metric equation
                                    skcis

                                    Thanks, RJ.

                                     

                                    You've given some really good points to clarify the above.

                                    1 2 Previous Next