Wandering's Blog » 日志 » EIGRP :: metric 笔记
EIGRP :: metric 笔记
Wandering 发表于 2008-04-28 10:41:34
.
[EIGRP Metric]
1. EIGRP metric = (IGRP metric) * 256
IGRP metric is 24 bits in length.
EIGRP metric is 32 bits in length.
2. K1 :: Bandwidth = (10,000,000 / bandwidth on interface, kbps) * 256
56K 45714176
1.544M 1657856 (10,000,000 / 1544 = 6476) * 256
10M 256000
100M 25600
1G 2560
3. K2 :: Loading
4. K3 :: Delay
sum of delays in the path, in tens of microseconds, mutliplied by 256
Delay = [(sum of the DLY, in microseconds) / 10] * 256
这里的DLY是从本地接口发出后,沿途所经所有源接口的DLY,举例:
DLY=8000usec DLY=10000usec
. .
. DLY=20000usec . DLY=5000usec
. . . .
. . 12.0.0.0/24 . .
|---lo0-( R1 )-s0/0------------------s0/0-( R2 )-lo0---|
. . . . . .
. . . . . .
. . BW=1544Kbit BW=1544Kbit . .
. . . .
. BW=8000000Kbit BW=8000000Kbit
. .
. .
1.1.1.0/24 2.2.2.0/24
在 R1 上 show ip route 得到的指向 2.2.2.0/24 的路由的 metric 值为 2,297,856
Bandwidth = (10,000,000 / 1544) * 256 = 6476 * 256 = 1,657,856
Delay = [(20000 + 5000)/10] * 256 = 2500 * 256 = 640,000
metric = K1*BW + K3*Delay = 1657856 + 256000 = 2,297,856
在 R2 上 show ip route 得到的指向 1.1.1.0/24 的路由的 metric 值为 2,118,656
Bandwidth = (10,000,000 / 1544) * 256 = 6476 * 256 = 1,657,856
Delay = [(10000 + 8000) / 10] * 256 = 1800 * 256 = 460,800
metric = K1*BW + K3*Delay = 1657856 + 460800 = 2,118,656
-
通过观察上面2个路由的 metric 可以看出,虽然只是2台路由器2个loopback接口之间的路由,并且在
链路带宽一致的情况下,得出的 metric 却是不同的。其原因就是 EIGRP 在计算 metric 时所取的
DLY 值是路由路径中所有链路的源端口的 DLY 值,由于一条链路上的2端接口的 DLY 值不同,才产生
了2个方向上的不同的 metric 结果。
事实上 bandwidth 的值并不是链路上的最小带宽,这个在很多书上的讲解都是错误的,在 EIGRP 的
metric 计算中,bandwidth 只是一个性能参考值,并不反映真实带宽,它就是本地接口上显示的 BW
值,可以通过接口命令 bandwidth 修改。例如:
R2(config)#int s0/0
R2(config-if)#bandwidth 1000
R2(config-if)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/3020800] via 10.1.1.1, 00:00:21, Serial0/0
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/0
可以看到, 1.1.1.0 的 metric 已从 2,118,656 变为 3,020,800
5. K4 :: Reliability
Can be observed at the result of show interface
6. K5 :: MTU
7. K1~K5 ---> B-L-D-R-M ---> BLack DReaM (这是我的一个记忆技巧)
8. Formula with default K values (K1=1, K2=0, K3=1, K4=0, K5=0):
metric = K1*BW + ((K2*BW)/(256-load)) + K3*delay = BW + delay
9. If K5 is not equal to 0:
metric = metric * [ K5/(reliability + K4) ]
10.K values are carried in EIGRP hello packets.
11.Mismatched K values can cause a neighbor to be reset.
>>>Reference: Routing TCP/IP volume 1 - IGRP
Bandwidth is expressed in units of kilobits per second. It is a static number used for metric calculation only and does not necessarily reflect the actual bandwidth of the linkthat is, bandwidth is not measured dynamically. For example, the default bandwidth of a serial interface is 1544, whether the interface is attached to a T1 or a 56K line. This bandwidth number may be changed from the default with the bandwidth command.
......
[EIGRP Metric]
1. EIGRP metric = (IGRP metric) * 256
IGRP metric is 24 bits in length.
EIGRP metric is 32 bits in length.
2. K1 :: Bandwidth = (10,000,000 / bandwidth on interface, kbps) * 256
56K 45714176
1.544M 1657856 (10,000,000 / 1544 = 6476) * 256
10M 256000
100M 25600
1G 2560
3. K2 :: Loading
4. K3 :: Delay
sum of delays in the path, in tens of microseconds, mutliplied by 256
Delay = [(sum of the DLY, in microseconds) / 10] * 256
这里的DLY是从本地接口发出后,沿途所经所有源接口的DLY,举例:
DLY=8000usec DLY=10000usec
. .
. DLY=20000usec . DLY=5000usec
. . . .
. . 12.0.0.0/24 . .
|---lo0-( R1 )-s0/0------------------s0/0-( R2 )-lo0---|
. . . . . .
. . . . . .
. . BW=1544Kbit BW=1544Kbit . .
. . . .
. BW=8000000Kbit BW=8000000Kbit
. .
. .
1.1.1.0/24 2.2.2.0/24
在 R1 上 show ip route 得到的指向 2.2.2.0/24 的路由的 metric 值为 2,297,856
Bandwidth = (10,000,000 / 1544) * 256 = 6476 * 256 = 1,657,856
Delay = [(20000 + 5000)/10] * 256 = 2500 * 256 = 640,000
metric = K1*BW + K3*Delay = 1657856 + 256000 = 2,297,856
在 R2 上 show ip route 得到的指向 1.1.1.0/24 的路由的 metric 值为 2,118,656
Bandwidth = (10,000,000 / 1544) * 256 = 6476 * 256 = 1,657,856
Delay = [(10000 + 8000) / 10] * 256 = 1800 * 256 = 460,800
metric = K1*BW + K3*Delay = 1657856 + 460800 = 2,118,656
-
通过观察上面2个路由的 metric 可以看出,虽然只是2台路由器2个loopback接口之间的路由,并且在
链路带宽一致的情况下,得出的 metric 却是不同的。其原因就是 EIGRP 在计算 metric 时所取的
DLY 值是路由路径中所有链路的源端口的 DLY 值,由于一条链路上的2端接口的 DLY 值不同,才产生
了2个方向上的不同的 metric 结果。
事实上 bandwidth 的值并不是链路上的最小带宽,这个在很多书上的讲解都是错误的,在 EIGRP 的
metric 计算中,bandwidth 只是一个性能参考值,并不反映真实带宽,它就是本地接口上显示的 BW
值,可以通过接口命令 bandwidth 修改。例如:
R2(config)#int s0/0
R2(config-if)#bandwidth 1000
R2(config-if)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/3020800] via 10.1.1.1, 00:00:21, Serial0/0
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/0
可以看到, 1.1.1.0 的 metric 已从 2,118,656 变为 3,020,800
5. K4 :: Reliability
Can be observed at the result of show interface
6. K5 :: MTU
7. K1~K5 ---> B-L-D-R-M ---> BLack DReaM (这是我的一个记忆技巧)
8. Formula with default K values (K1=1, K2=0, K3=1, K4=0, K5=0):
metric = K1*BW + ((K2*BW)/(256-load)) + K3*delay = BW + delay
9. If K5 is not equal to 0:
metric = metric * [ K5/(reliability + K4) ]
10.K values are carried in EIGRP hello packets.
11.Mismatched K values can cause a neighbor to be reset.
>>>Reference: Routing TCP/IP volume 1 - IGRP
Bandwidth is expressed in units of kilobits per second. It is a static number used for metric calculation only and does not necessarily reflect the actual bandwidth of the linkthat is, bandwidth is not measured dynamically. For example, the default bandwidth of a serial interface is 1544, whether the interface is attached to a T1 or a 56K line. This bandwidth number may be changed from the default with the bandwidth command.
......
相关日志:
收藏:
QQ书签
del.icio.us
订阅:
Google
抓虾
