Walk me through the classic EIGRP metric calculation with the default K values.
Show the answer
Say this first
With the defaults K1=1, K2=0, K3=1, K4=0 and K5=0, the metric is 256 x (10^7 / slowest bandwidth in kbps + total delay in tens of microseconds). Bandwidth is the lowest along the path; delay is added up along the path. For a LAN two gigabit hops away: 256 x (10 + 3) = 3328.
Go deeper
The full formula
metric = 256 x [K1 x BW + (K2 x BW) / (256 - load) + K3 x delay], and if K5 is not 0 the result is
multiplied by K5 / (reliability + K4).
BW= 10^7 divided by the lowest bandwidth on the path in kbps, rounded down to a whole number.delay= sum of the interface delays along the path, in tens of microseconds. With default K values this collapses to256 x (BW + delay).
Where the inputs come from
R1# show interfaces GigabitEthernet0/0/0 | include BW
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,| Interface | BW (kbps) | DLY | BW term | Delay term per hop |
|---|---|---|---|---|
| GigabitEthernet | 1000000 | 10 usec | 10 | 1 |
| FastEthernet | 100000 | 100 usec | 100 | 10 |
| Serial T1 | 1544 | 20000 usec | 6476 | 2000 |
| Loopback | 8000000 | 5000 usec | 1 | 500 |
Each router adds the delay of the interface it learned the route on, and the originating router adds the delay of the connected interface.
Worked example 1: all gigabit
10.50.0.0/24 is a gigabit LAN on R5. R1 reaches it through R2. Three gigabit interfaces are crossed: R1 toward R2, R2 toward R5, and R5's LAN interface.
- BW term: 10^7 / 1000000 = 10
- Delay term: 10 + 10 + 10 = 30 usec, which is 3 tens of usec
- Metric: 256 x (10 + 3) = 3328 For R2 the same LAN is one interface less: 256 x (10 + 2) = 3072. On R5 it is connected: 256 x (10 + 1) = 2816, the familiar number for a gigabit connected route.
Worked example 2: a T1 in the path
Same LAN, but the path crosses a T1 plus two gigabit interfaces.
- BW term: 10^7 / 1544 = 6476.7, rounded down to 6476
- Delay term: 20000 + 10 + 10 = 20020 usec, which is 2002
- Metric: 256 x (6476 + 2002) = 256 x 8478 = 2170368
They will ask next
Why multiply by 256?
EIGRP grew out of IGRP, whose metric was 24 bits. EIGRP uses 32 bits, so it scales the old IGRP formula by 256 to keep the same proportions with more resolution.
If you want to steer EIGRP, do you change bandwidth or delay?
Delay. It is additive, so it changes the path cost predictably, and nothing else uses it. The
bandwidthcommand also feeds QoS percentages and EIGRP's own pacing, which by default lets EIGRP use at most 50 percent of the interface bandwidth, so a wrong low value slows convergence.
Traps
- Adding bandwidths along the path. Bandwidth is the minimum; only delay is summed.
- Using microseconds directly. The formula uses tens of microseconds.
- Forgetting the destination LAN's own interface delay.