![eigrp不等价负载均衡_职场](https://s2.51cto.com/attachment/200911/200911241259060472870.jpg?x-oss-process=image/resize,m_fixed,w_1184)
r1配置:
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r1
r1(config-if)#ip add 219.146.0.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#in s1/1
r1(config-if)#ip add 219.146.1.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#exi
r1(config-router)#network 219.146.0.0 0.0.0.255 //添加直连网络
r1(config-router)#network 219.146.1.0 0.0.0.255 //也可以不加反掩码
r1(config-router)#exi
r2配置:
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r2
r2(config-if)#ip add 219.146.2.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#in s1/1
r2(config-if)#ip add 219.146.1.2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exi
r2(config-router)#network 219.146.1.0 0.0.0.255 //添加直连网络
r2(config-router)#network 219.146.2.0 0.0.0.255
r2(config-router)#exi
r3配置:
Router#conf t
Router(config)#enable secret abc
Router(config)#line console 0
Router(config-line)#password abc
Router(config-line)#login
Router(config-line)#logging synchronous
Router(config-line)#exec-timeout 0 0
Router(config-line)#exi
Router(config)#no ip domain lookup
Router(config)#no cdp run
Router(config)#hostname r3
r3(config-if)#ip add 219.146.0.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#in s1/1
r3(config-if)#ip add 219.146.2.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exi
r3(config-router)#network 219.146.0.0 0.0.0.255 //添加直连网络
r3(config-router)#network 219.146.2.0 0.0.0.255
r3(config-router)#exi
r1(config-if)#bandwidth 64 //带宽设为64kb/s
r1(config-if)#in s1/1
r1(config-if)#bandwidth 64
r1(config-if)#exi
r2(config)#in s1/1
r2(config-if)#bandwidth 64
r2(config-if)#in s1/0
r2(config-if)#band 64
r2(config-if)#exi
r3(config)#in s1/0
r3(config-if)#band 64
r3(config-if)#in s1/1
r3(config-if)#band 64
r3(config-if)#exi
查看r3的路由表:
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
C 219.146.0.0/24 is directly connected, Serial1/0
D 219.146.1.0/24 [90/41024000] via 219.146.2.1, 00:02:45, Serial1/1
[90/41024000] via 219.146.0.1, 00:02:45, Serial1/0
r1(config)#in s1/1
r1(config-if)#delay 10 //在r1的s1/1接口上把延迟设为10
r1(config-if)#exi
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
C 219.146.0.0/24 is directly connected, Serial1/0
D 219.146.1.0/24 [90/40514560] via 219.146.0.1, 00:01:35, Serial1/0
r3(config)#router eigrp 10
r3(config-router)#variance 2 //设最大不等价数为2
r3(config-router)#exi
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
C 219.146.0.0/24 is directly connected, Serial1/0
D 219.146.1.0/24 [90/41024000] via 219.146.2.1, 00:00:24, Serial1/1
[90/40514560] via 219.146.0.1, 00:00:24, Serial1/0
已经实现了不等价负载均衡。
r1(config-router)#variance 2
r1(config-router)#exi
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
[90/41024000] via 219.146.0.2, 00:00:16, Serial1/0
C 219.146.0.0/24 is directly connected, Serial1/0
C 219.146.1.0/24 is directly connected, Serial1/1
同样:
r2(config)#router eigrp 10
r2(config-router)#variance 2
r2(config-router)#exi
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
D 219.146.0.0/24 [90/41024000] via 219.146.2.2, 00:00:52, Serial1/0
[90/41024000] via 219.146.1.1, 00:00:52, Serial1/1
C 219.146.1.0/24 is directly connected, Serial1/1
同样,大于1的值直接去掉小数部分,不四舍五入,小于1的值取1.