cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
630
Views
0
Helpful
1
Replies

Wrong EIGRP Metric calculation with floating point

halldentong
Level 1
Level 1

Hi all,

 

Can someone to explain the EIGRP metric why using BW with floating point to multiply 256? 

As I knew we should rounded the floating point to integer. 

 

BW = (10000000/30000) * 256 = 333.33333333333333333333333333333 *256

#rounded the BW to 333, so 333 * 256 = 85248

 

Delay =  (1130/10) * 256 = 28928

Metric = BW + Delay = 114176

114176 does not match to below metric. 

 

Then I calculate again with floating point value during calculate BW, but rounded the final result to integer is match, what;s wrong?

 

BW = (10000000/30000) * 256 = 333.33333333333333333333333333333 *256

BW = 85333.333333333333333333333333333

Delay =  (1130/10) * 256 = 28928

Metric = BW + Delay = 114261.33333333333333333333333333

 

Wrong Metric on NX-OS.jpg

1 Reply 1

eekman
Level 1
Level 1

You basically never round numbers in calculation before the result, since it corrupts the values along the way and may cause a result way different than when decimal numbers or fractions are used. My guess is that EIGRP round the result for nicer output and the decimals are not needed when comparing a RD to another (the difference 0.333 when we're talking values in the million range are tiny and pointless)

Review Cisco Networking for a $25 gift card