EIGRP Metric 計算

以下為預設value

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

Metric公式

Metric = 256*((K1*Scaled Bw) + (K2*Scaled Bw)/(256 – Load) + (K3*Scaled Delay)*(K5/(Reliability + K4)))

由於K2, K4, K5預設都是0的原因, 所以公式簡化如下

Metric = 256*(Scaled Bw + Scaled Delay)

離題一下, 我自己試過代入1和0到最原始的公式, (K5/(Reliability + K4))如果是0的話, 應該(K3*Scaled Delay)*0都是0, 不知道為什麼簡化後, Scaled Delay還在, 官方文件說有就有吧

The minimum bandwidth (Bw) of the route, in kilobits per second. It can be 0 or any positive integer. The bandwidth for the formula is scaled and inverted by using the following formula:
Scaled Bw = (10^7/minimum bandwidth (Bw) in kilobits per second)

Route delay, in tens of microseconds
Scaled Delay = (Delay/10)

Reference:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_eigrp/configuration/15-s/ire-15-s-book/ire-wid-met.pdf

R1

int f0/0
no shut
ip add 192.168.12.1 255.255.255.0

router eigrp 1
no auto
network 192.168.12.0 0.0.0.255

R2

int f0/0
no shut
ip add 192.168.23.2 255.255.255.0

int f0/1
no shut
ip add 192.168.12.2 255.255.255.0

router eigrp 1
no auto
network 192.168.23.0 0.0.0.255
network 192.168.12.0 0.0.0.255

R3

int l0
no shut
ip add 192.168.10.3 255.255.255.0

int f0/1
no shut
ip add 192.168.23.3 255.255.255.0

router eigrp 1
no auto
network 192.168.10.0 0.0.0.255
network 192.168.23.0 0.0.0.255

下圖查看有沒有更改metric設定

由於沒有看到metric的設定, 所以可以用簡化公式計算

Metric = 256*(Scaled Bw + Scaled Delay)

Scaled Bw = (10^7/minimum bandwidth (Bw) in kilobits per second)
Scaled Delay = (Delay/10)

先看192.168.0.0/24的FD是甚麼計算出來
BW = (10^7/8000000)=1.25=1
Delay = (5000/10)=500
Metric = 256*(1 + 500)=128256

再來看看192.168.23.0/24
BW = (10^7/100000)=100
Delay = (100/10)=10
Metric = 256*(100+10)=28160

再來看看R2到R3的192.168.0.0/24, 由於這個網段需要經過next hop 192.168.23.3, 所以BW會R2和R3選最小的, Delay會相加
BW = (10^7/100000)=100
Delay = (100+5000/10)=510
Metric = 256*(100+510)=156160

再來就就是R1去192.168.0.0/24的FD

BW = (10^7/100000)=100
Delay = (100+100+5000/10)=520
Metric = 256*(100+520)=158720

發佈留言

*