名词解释
AD:通告距离,邻居到达目的地的metric值;
FD:可行距离,本路由器到达目的地的最短metric值;
Successor:简称S,指的是本路由器去往目的地的最短路径所经过的接口及下一跳路由器(S就是本路由器到达目的地的最短路径的所经的下一跳路由器)
FS:可行后继;当非FD的AD小于FD的时候,这条路径备成为FS,也叫FC
拓扑简介
全网运行EIGRP,R1上有172.16.0.1/24、172.16.1.1/24,172.16.2.1/24和172.16.3.1/24;R1发布4条路由。
根据拓扑所示,R1学习4.4.4.4和R4学习1.1.1.1,我们分别从R1和R4上show ip eigrp topology all-links,发现有区别,详见下图:
R1#sh ip eigrptopologyall-links
IP-EIGRP Topology Table for AS(100)/ID(172.16.3.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R -Reply,
r - reply Status, s- sia Status
P 3.3.3.3/32, 1 successors, FD is 409600, serno 13
via 10.1.13.3(409600/128256), FastEthernet0/0
via 10.1.12.2(2349056/435200), Serial1/1
P 4.4.4.4/32, 1 successors,FD is 435200, serno 15
via 10.1.13.3 (435200/409600),FastEthernet0/0
via 10.1.12.2 (2323456/409600), Serial1/1
P 2.2.2.2/32, 1 successors, FD is 460800, serno 17
via 10.1.13.3(460800/435200), FastEthernet0/0
via 10.1.12.2(2297856/128256), Serial1/1
(2374656/460800),Serial1/1
R4#sh ip eigrptopologyall-links
IP-EIGRP Topology Table for AS(100)/ID(4.4.4.4)
Codes: P - Passive, A - Active, U - Update, Q - Query, R -Reply,
r - reply Status, s- sia Status
P 1.1.1.1/32, 1 successors,FD is 435200, serno 13
via 10.1.34.3 (435200/409600),FastEthernet0/1
P 2.2.2.2/32, 1 successors, FD is 409600, serno 6
via 10.1.24.2(409600/128256), FastEthernet0/0
P 3.3.3.3/32, 1 successors, FD is 409600, serno 4
via 10.1.34.3(409600/128256), FastEthernet0/1
P 4.4.4.4/32, 1 successors, FD is 128256, serno 1
via Connected,Loopback0
很明显:R1上学到4.4.4.4的路由,在eigrp的拓扑表里有两条,而R4上学到1.1.1.1的路由,拓扑表里只有1条,原因在哪里?
我们分别分析一下R1到4.4.4.4以及R4到1.1.1.1的FD、AD情况:
分别从R1-R2-R3-R4上show ipeigrp totologyall-links查看,可以发现
始发路由器 |
下一跳路由器 |
FD |
AD |
目的地址 |
R4 |
R3 |
435200 |
409600 |
1.1.1.1 |
R2 |
460800 |
|||
R1 |
R3 |
435200 |
409600 |
4.4.4.4 |
R2 |
2323456 |
409600 |
成为FS的条件是:非FD的AD < FD
由此发现R4去往1.1.1.1时,R3是successor,经R2时,AD:460800大于FD 435200,因此R2不是FS,所以在拓扑表里只有一条道1.1.1.1的路径;
而R1去往4.4.4.4时,R3是successor,且走R2时的AD 409600小于FD 435200,所以R2可以成为FS,所以R1的拓扑表里去往4.4.4.4有两条路劲,那么就可以做不等价的负载均衡。
做不等价的负载均衡,需要计算V值:
Successor的FD*V值 > FS的FD
以R1去往4.4.4.4为例,V值计算如下:
435200*V >2323456
那么V值=5.33,我们取 6
R1#router eig 100
variance 6
此时再看R1的路由:
R1#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 NSSAexternal type 1, N2 - OSPF NSSA external type 2
E1 - OSPF externaltype 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 interarea, * - 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/32 issubnetted, 1 subnets
C1.1.1.1 isdirectly connected, Loopback0
2.0.0.0/32 issubnetted, 1 subnets
D2.2.2.2 [90/460800] via10.1.13.3, 00:00:20, FastEthernet0/0
[90/2297856] via10.1.12.2, 00:00:20, Serial1/1
3.0.0.0/32 issubnetted, 1 subnets
D3.3.3.3[90/409600] via 10.1.13.3, 00:00:20, FastEthernet0/0
4.0.0.0/32 issubnetted, 1 subnets
D4.4.4.4 [90/435200] via10.1.13.3, 00:00:20, FastEthernet0/0
[90/2323456] via10.1.12.2, 00:00:20, Serial1/1
172.16.0.0/24 issubnetted, 4 subnets
R1去往4.4.4.4和2.2.2.2是多跳路径,但是metric不相同,只有EIGRP支持不等价负载均衡。