Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IGRP AND EIGRP METRIC CALCULATION 1

Status
Not open for further replies.

jmilne

Technical User
Dec 10, 2002
4
GB
Metric = [K1 * Bandwidth + (K2 * Bandwidth)/(256-load) + K3*Delay] * [K5/(reliability + K4)]

This is the IGRP metric calculation. Defualt values are:

K1 = 1
K3 = 1
K2 = 0
K4 = 0
K5 = 0.

I quote
"If K5 = 0, the [K5/(reliability + K4)] term is not used. So, given the default values for K1 through K5, the composite metric calculation used by IGRP reduces to Metric = Bandwidth + Delay."

What do they mean that "the [K5/(reliability + K4)] term is not used."? Does the software run an if statement and use two different versions of the formula depending on the value of K5? I'm asking because I'm fairly sure that if you substitute the default values in to the above expression as it stands, then the answer will ALWAYS be zero.
 
That's exactly what it means, since with K5 = 0, there is NO need to perform the K5/(reliability*K4), and if you did, the "256-load) + K3*Delay] * [K5/(reliability + K4)]" portion would evaluate to zero (since anything times zero is zero), and division by zero isn't permitted (when the entire equation is looked at).
 
This is where I get completely thrown off by the published calculation for the metric. If you look at the equation that is given, the entire first part (up until the K3*Delay) is then multiplied by the second part (K5/(Reliability+K4)). If you follow the placement of the brackets, with K5=0, the metric must always be 0 since anything multiplied by 0 is always 0. This equation cannot be correct, despite being published all throughout Cisco's website, Networkers documents, everywhere. The only way that I can make this work is if the * between these two parts is a + instead:

Metric = [K1 * Bandwidth + (K2 * Bandwidth)/(256-load) + K3*Delay] + [K5/(reliability + K4)]

This will cause the second part to drop out of the equation if K5=0 and will cause the default metric to boil down to K1*BW + K3*Delay.

Has anyone seen any technical docs from Cisco that mention this issue. I'd hope someone noticed this issue before now, but since the K values are so rarely modified from the defaults, it's possible that nobody bothered to change the documentation.

Thanks,
John
 
If K5 = 0, the [K5/(reliability + K4)] term is not used. So, given the default values for K1 through K5, the composite metric calculation used by IGRP reduces to Metric = Bandwidth + Delay."

I don't see that the equation "cannot" be correct, but I'll leave it to people smarter than myself to determine if it *is* correct. As I read this, when K5=0, the entire term is dropped from the equation so that it (the entire equation) won't always evaluate to 0.

Or:

if (K5 != 0)
Metric = [K1 * BW + (K2 * BW)/(256-load) + K3*Delay] * [K5/(reliability + K4)]
else
Metric = [K1 * BW + (K2 * BW)/(256-load) + K3*Delay]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top