CISCO路由器EIGRP非等价负载均衡(Unequal-Cost Load Balancing)配置
发布:站生 | 发布时间: 2009年11月11日Cisco IOS默认支持4条等价链路的负载均衡,最大支持6条。Eigrp支持不等价链路的负载均衡,合作variance命令,跟上一个乘数,默认是1(即代表等价链路的均衡负载,variance的值的范围是1~128,这个乘数代表了可以接受的不等价链咯的度量值的倍数,在这个范围内的链路都将被接受,并且被加入路由表中)
下面详解一下EiGRP非等价负载均衡配置。示例图如下所示
基本配置:
一、配置路由器R1
R1(config)#route eigrp 100
R1(config-router)#network 192.168.100.0 0.0.0.255
R1(config-router)#network 192.168.200.0 0.0.0.255
R1(config-router)#network 192.168.1.0 0.0.0.255
R1(config-router)#no auto-summary
二、配置路由器R2(R2为时钟端)
R2(config-if)#int s0/0/0
R2(config-if)#bandwidth 64
R2(config-if)#int s0/0/1
R2(config-if)#bandwidth 128
R2(config)#router eigrp 100
R2(config-router)#network 192.168.100.0 0.0.0.255
R2(config-router)#network 192.168.200.0 0.0.0.255
R2(config-router)#network 192.168.2.0 0.0.0.255
下面查看一下R2的路由表和拓扑表
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
D 192.168.1.0/24 [90/20514560] via 192.168.200.1, 00:13:38, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.100.0/24 is directly connected, Serial0/0/0
C 192.168.200.0/24 is directly connected, Serial0/0/1
从以上结果可以看到网络192.168.1.0的路径只有一条s0/0/1
R2#show ip eigrp topology
IP-EIGRP Topology Table for AS 1
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - Reply status
P 192.168.100.0/24, 1 successors, FD is 40512000
via Connected, Serial0/0/0
P 192.168.200.0/24, 1 successors, FD is 20512000
via Connected, Serial0/0/1
P 192.168.1.0/24, 1 successors, FD is 20514560
via 192.168.200.1 (20514560/28160), Serial0/0/1
via 192.168.100.1 (4294967295/28160), Serial0/0/0
P 192.168.2.0/24, 1 successors, FD is 28160
via Connected, FastEthernet0/0
从邻居表可以看出,通过192.168.200.1到达192.168.1.0网络的FD是20514560,通过192.168.100.1到达192.168.1.0网络的FD是4294967295,所以EIGRP选择FD小的放入路由表中。
下面通过修改variance来实现非等价负载均衡
R2(config)#route eigrp 1
R2(config-router)#variance 2
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
D 192.168.1.0/24 [90/20514560] via 192.168.200.1, 00:04:21, Serial0/0/1
[90/4294967295] via 192.168.100.1, 00:04:21, Serial0/0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.100.0/24 is directly connected, Serial0/0/0
C 192.168.200.0/24 is directly connected, Serial0/0/1
从上可以看出,通过修改variance的值,到达192.168.1.0网络的路径变成两条,从而实现了非等价负载均衡。
注:以上为正确配置,不过本人在Packet Tracer 5.1环境下没有配置成功,查看R2路由表时到达192.168.1.0的路径只有一条,可能是模拟器的问题。
- 相关文章:
CISCO路由器EIGRP认证(Authentication)配置 (2009-11-11 14:9:0)
CCNA 2009年第二学期官方测试题《Final Examination》(附答案) (2009-11-8 18:35:50)
配置路由时输入no shutdown激活端口返回的两条信息 (2009-11-4 21:44:28)
rip1与rip2的区别之处详细讲解 (2009-11-2 12:26:0)
CISCO路由器DHCP服务器配置 (2009-10-29 12:12:14)
CISCO路由器配置密码login与login local 的区别 (2009-10-27 23:42:18)
什么是网络地址转换(NAT)?网络地址转换讲解及实例分析(详细) (2009-10-24 1:42:5)
发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。