## Wednesday, December 05, 2007

### CCIE EIGRP METRIC One of the annoying fileds in my opinion is calculation, I hate them! in my mind it is just in the way of the cool stuff. but unfurtunetly to get to the cool stuf you need to calculate.

so I would like to start by giving you a little review and may be more indepth look over EIGRP Metric, as we all should know EIGRP is a Hybrid Routing Protocol that use a Composite Metric in his DUAL Diffusing Update Algorithm. the Composite metric is composed (good word selection :-)!?) from K Values.

K1 K2 K3 K4 K5

K1 = Bandwidth = 1 meaning it is used in the calculation by default.

K2 = load = 0 you gust it, meaning that is not participating in the calculation by default.

K3 = Delay = 1 you can take it from here

K4 = Reliability = 0

K5 = MTU = 0

the K values tells us if the value is participating in the calculation or not and what is the weight of the value, meaning that if you set K1 to 3 then it means that the weight of K1 will be 3 times more "important" or in other words it will take the BW * 3.

So now we know what are the "K" Values we need to know how to calculate:

well I will not endolge you with long version of the formula as it is hardly ever use (by hardly I mean I never seen it fully used).

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]

in the attached picture I draw a small network to demonstrate what I mean to get from R1 to R3 netwrok 3.3.3.0/24

you have the following options:
R1 -> R2 -> R3
The lowes bandwith in that path is 64Kbps
The Delay is 20000 for the 64Kbps link 100 for the 100 Mbps linke and another 100 for the 3.3.3.0/24 network link also 100Mbps = 20200 microseconds delay.

so now lets put all into the formula:

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 100 + 100)]
Metric = [256 * (156250) + 256 * (20200)]
Metric = [40000000 + 5171200]

R1 -> R4 -> R3

Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 1000 + 100)]

! note that now you have 1000 in the path as it is a regular 10 Mbps Ethernet
Metric = [256 * (156250) + 256 * (21100)]
Metric = [40000000 + 5401600]

Metric = 45401600 = FD

R1 -> R2 -> R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 20000 + 20000 + 100)]
Metric = [256 * (156250) + 256 * (60100)]
Metric = [40000000 + 15385600]

Metric = 55385600 = FD

R1 -> R4 -> R2 -> R3 I think you should do it now, you should get the point of the calculation

Now that have an idea how to calculate we need to see what route is preferd, in that senarion it is easy but in complex networks this basics can help us understand the proccess (leave the calc to the router).

FD as I was mentioning this Feasable Distance is the Metric that our router see from his outgoing interface to the point he wish to go, also caled end-to-end metric.

AD Advertised Distance that is the Distance we recive from our directly connected neighbor for the path we wish to go.

so for FD of R1 ->R2 ->R3 we get an AD of R2->R3.

FS Feasible Successor is the Router that is chosen by us to be the next hop to the Destination Prefix.

FC Feasible Condition is a rule that tells us in a very logical way to select a FS he must send to us an AD that is lower then the FD.

if we received from R4 for example a AD higher then the FD that we had already in our topology table to get to R3 then we would not consider him to be a Feasible Successor.

so final step lets take the Paths and FD and Calculate the AD and see what path sould we go as I am already exited where to go from now:

Now our AD for the Paths sent to R1:

R2 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/100000) + 256 * (100 + 100)]
Metric = [256 * (100) + 256 * (200)]
Metric = [25600 + 51200]

Metric = 45171200 =FD

R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 100)]
Metric = [256 * (156250) + 256 * (20100)]

Metric = [40000000 + 5145600]
Metric = 45401600 = FD

R1 -> R2 -> R4 -> R3
Metric = [256 * (10^7/BW) + 256 * (Accumulated Delay)]
Metric = [256 * (10^7/64) + 256 * (20000 + 20000 + 20000 + 100)]
Metric = [256 * (156250) + 256 * (60100)]
Metric = [40000000 + 15385600]

Metric = 55385600 Here we can clearly see that there is not way that this route can meet the FC.
So we have a winner:
Metric = 45171200 =FD

to get to R3 3.3.3.0/24 R1 will take the path R1 ->R2 -> R3.
if it will fail then the path R1 ->R4->R3 will be taken as he still qualified to meet then FC for FS

FS Feasible Successor the second path in the topology that is set only of FC are met.

I hope this was an intersting article :-)

beatbox32 said...

Nice article..EIGRP metrics have always been a headache for me. ;-)

Unknown said...

sir for R2->R3 AD, why is the bandwidth value is 100000. both R2 & R3 uses 100mbps link? im just confused. thanks in advance :)

cciep3 said...

100000 KB = 100 Mb simple as that :-)

cciep3 said...

100000 KB = 100 Mb simple as that :-)

cciep3 said...

I was noted by one of the reader's that the delay should be in tens of microseconds and not in microseconds as it shown under the interface, and that is technecly correct altough my point for the article was not to make the life more complicated then it is already.

Thank you

Unknown said...

it was nice explanation..was always confused about eigrp metric

Unknown said...

thank you....

Sudharsan_N said...

Hi Shiran,
If the metric K5 = MTU = 0, does this means are we going to send 0 bytes.Meaning ... no packet is going to go out?

To my understanding the MTU is not considered to be part of EIGRP composite metric calculation.
HOwever its one of the parameter optionally that can be used to determine the best path.

And also k5 is not equal to MTU. However its a modifier which can affect the RELIABILITY in the composite metric calculation.

Cheers,
Sudharsan

cciep3 said...

Hi Sudharsan

That is a very good question, actually the answer is very simple, NO! :-)

And to explain a little:

the k[1-5] values are used by the protocol for establishing a metric calculation method only, so it dose not effect the actual type or size of traffic.

To summarize:

k values are used to tweak the metric calculation to suit your needs from the routing protocol.

subham dalmia said...

why does eigrp uses slowest b.w. in metric calc & wht will happen if we use a faster b.w. instead?

cciep3 said...

I am not sure what you mean by slowest bandwidth, the metric is a composite of values.

EIGRP metric is basically an [IGRP metric] * 256

If you refer to the reference bandwidth of 10MB that can't be modified, however you can increase the K value.
See below:
! with K1 = 1

P 1.0.1.4/32, 1 successors, FD is 2560
via 1.0.0.22 (2560/256), GigabitEthernet0/0

(config-router)#metric weights 0 2 0 0 0 0
! now with K1 = 2
P 1.0.1.4/32, 1 successors, FD is 5120
via 1.0.0.22 (5120/512), GigabitEthernet0/0 