EIGRP
拓扑如下:
路由A实现通往路由C 的lo0接口,启用非等价负载均衡
查看路由A的route table
Router#show 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
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
10.0.0.0/30 is subnetted, 4 subnets
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:00:50, Serial1/1
D 10.2.1.0 [90/6023936] via 10.1.1.2, 00:01:00, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:00:50, Serial1/1
[90/6151936] via 10.1.1.2, 00:00:50, Serial1/0
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:00:50, Serial1/1
D 10.2.1.0 [90/6023936] via 10.1.1.2, 00:01:00, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:00:50, Serial1/1
[90/6151936] via 10.1.1.2, 00:00:50, Serial1/0
通往192.168.2.0/24的路径有2条 ,而且度量值是相同的 EIGRP自动实现负载均衡
现在把s1/1的bandwidth 改为512,S1/0的bandwidth改为256
Router#show 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
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
10.0.0.0/30 is subnetted, 4 subnets
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:01:26, Serial1/1
D 10.2.1.0 [90/6535936] via 10.4.1.2, 00:01:26, Serial1/1
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:01:26, Serial1/1
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:01:26, Serial1/1
D 10.2.1.0 [90/6535936] via 10.4.1.2, 00:01:26, Serial1/1
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:01:26, Serial1/1
所以现在路由A走S1/1的路
现在设置
Variance值
先看下eigrp拓扑
Router#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(192.168.1.1)
IP-EIGRP Topology Table for AS(100)/ID(192.168.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
r - reply Status, s - sia Status
P 10.3.1.0/30, 1 successors, FD is 6023936
via 10.4.1.2 (6023936/5511936), Serial1/1
P 10.2.1.0/30, 1 successors, FD is 6535936
via 10.4.1.2 (6535936/6023936), Serial1/1, serno 120
via 10.1.1.2 (11023872/5511936), Serial1/0
P 10.1.1.0/30, 1 successors, FD is 10511872
via Connected, Serial1/0
via 10.4.1.2 (7047936/6535936), Serial1/1
P 10.4.1.0/30, 1 successors, FD is 5511936
via Connected, Serial1/1
P 192.168.1.0/24, 1 successors, FD is 128256
via Connected, Loopback0
P 192.168.2.0/24, 1 successors, FD is 6151936
via 10.4.1.2 (6151936/5639936), Serial1/1, serno 111
via 10.1.1.2 (11151872/5639936), Serial1/0
via 10.4.1.2 (6023936/5511936), Serial1/1
P 10.2.1.0/30, 1 successors, FD is 6535936
via 10.4.1.2 (6535936/6023936), Serial1/1, serno 120
via 10.1.1.2 (11023872/5511936), Serial1/0
P 10.1.1.0/30, 1 successors, FD is 10511872
via Connected, Serial1/0
via 10.4.1.2 (7047936/6535936), Serial1/1
P 10.4.1.0/30, 1 successors, FD is 5511936
via Connected, Serial1/1
P 192.168.1.0/24, 1 successors, FD is 128256
via Connected, Loopback0
P 192.168.2.0/24, 1 successors, FD is 6151936
via 10.4.1.2 (6151936/5639936), Serial1/1, serno 111
via 10.1.1.2 (11151872/5639936), Serial1/0
要实现负载均衡FC要满足两个条件:一是首先要成为可继路由,即FC的AD<最优的FD。二是最优FD乘以variance>次优FD
看的出最优FD的值是6151936
若想做可继路由的话 走S1/0的AD必须小于S1的FD
即
5639936<= 6151936
所以S1/0成为可继
若想实现非等价负载 则Variance值=
11151872/6151936=取整(1.81)+1 =2
且6151936*2=12303872 >11151872
Router(config)#router eig
Router(config)#router eigrp 100
Router(config-router)#va
Router(config-router)#variance 2
Router(config)#router eigrp 100
Router(config-router)#va
Router(config-router)#variance 2
再show下路由表
Router#show ip route
*May 22 21:33:02.671: %SYS-5-CONFIG_I: Configured from console by console
Router#show 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
*May 22 21:33:02.671: %SYS-5-CONFIG_I: Configured from console by console
Router#show 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
10.0.0.0/30 is subnetted, 4 subnets
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:01:08, Serial1/1
D 10.2.1.0 [90/6535936] via 10.4.1.2, 00:01:08, Serial1/1
[90/11023872] via 10.1.1.2, 00:01:08, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:01:08, Serial1/1
[90/11151872] via 10.1.1.2, 00:01:08, Serial1/0
D 10.3.1.0 [90/6023936] via 10.4.1.2, 00:01:08, Serial1/1
D 10.2.1.0 [90/6535936] via 10.4.1.2, 00:01:08, Serial1/1
[90/11023872] via 10.1.1.2, 00:01:08, Serial1/0
C 10.1.1.0 is directly connected, Serial1/0
C 10.4.1.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
D 192.168.2.0/24 [90/6151936] via 10.4.1.2, 00:01:08, Serial1/1
[90/11151872] via 10.1.1.2, 00:01:08, Serial1/0
show下去192.168.2.0/24的路由
Router#show ip route 192.168.2.1
Routing entry for 192.168.2.0/24
Known via "eigrp 100", distance 90, metric 6151936, type internal
Redistributing via eigrp 100
Last update from 10.1.1.2 on Serial1/0, 00:10:48 ago
Routing Descriptor Blocks:
* 10.4.1.2, from 10.4.1.2, 00:10:48 ago, via Serial1/1
Route metric is 6151936, traffic share count is 20
Total delay is 45000 microseconds, minimum bandwidth is 512 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
10.1.1.2, from 10.1.1.2, 00:10:48 ago, via Serial1/0
Route metric is 11151872, traffic share count is 11
Total delay is 45000 microseconds, minimum bandwidth is 256 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
Routing entry for 192.168.2.0/24
Known via "eigrp 100", distance 90, metric 6151936, type internal
Redistributing via eigrp 100
Last update from 10.1.1.2 on Serial1/0, 00:10:48 ago
Routing Descriptor Blocks:
* 10.4.1.2, from 10.4.1.2, 00:10:48 ago, via Serial1/1
Route metric is 6151936, traffic share count is 20
Total delay is 45000 microseconds, minimum bandwidth is 512 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
10.1.1.2, from 10.1.1.2, 00:10:48 ago, via Serial1/0
Route metric is 11151872, traffic share count is 11
Total delay is 45000 microseconds, minimum bandwidth is 256 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
如表所知,在S1/1每往192.168.2.0网段发送20个包后,S1/0才往192.168.2.0网段发送11个包
实现了非等价负载均衡
现在ping 192.168.2.1 repeat 20看下,记得在ping之前 no ip cef 同时debug ip icmp
看下dsc地址是不是分别s1/1或s1/0接口就可以了