思科EIGRP非等价负载均衡


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的路径只有一条,可能是模拟器的问题。
本文来源于蛐蛐工作室 http://www.qqgzs.com/ , 原文地址: http://www.qqgzs.com/archives/cisco-eigrp-unequal-cost-load-balancing.html

 

你可能感兴趣的:(职场,休闲,思科,EIGRP,非等价负载)