EIGRP 非等价负载平衡

EIGRP 能够被配置来负载均衡最多四条非等价成本的路径。这个性能被成为非等价负载均衡成本负载平衡并被设置来使用variance命令,缺省时,路由器将会负载 平衡四条等成本道路。Variance命令让你设置更查的可选道路(以度量值为依据),还能被用来进行负载均衡。
例: 路由器A有两条到达网络3.3.3.0的路径,一条的成本是4,另一条的成本是8,缺省时只会使成本为4的路径来发送包到3.3.3.3。如果被设置了 variance命令,路由器将会在道路间进行负载均衡。之所以发生这种情况是因为费用为8的路径在variance内,它是最优路径的两倍(4(最优路 径)*2=8)。
配置概述
这个配置将会验证variance命令的使用,这允许EIGRP启动的路由器在非等成本道路间进行负载均衡。variance命令被设置到路由器A上,所以到达网络3.3.3.3的两条道路都被使用。
路由器A.B.C用一个交叉电缆串行的接在一起,路由器A和B还经过一个以太网中继器连在一起。
路由器B作为DCE,向路由器A和提供时钟,各自的IP地址如下图,所有路由器都配置了EIGRP,路由器A将被用来进行负载均衡交通,通过到达3.3.3.3的两条非等价成本道路。
路由器配置:
路由器A:
routerA(config)# int lo 0
routerA(config-if)# ip address 10.1.1 .1 255.255.255.0
routerA(config-if)# no shutdown
routerA(config)# int fa0/0
routerA(config-if)# ip address 152.1.1.1 255.255.255.0
routerA(config-if)# no shutdown
routerA(config-if)#keepalive
routerA(config)# int s2/1
routerA(config-if)# ip address 192.1.1.1 255.255.255.0
routerA(config-if)# no shutdown
routerA(config)# router eigrp 64
routerA(config-router)# variance 2
routerA(config-router)# net 10.0.0 .0
routerA(config-router)# net 152.1.0.0
routerA(config-router)# net 192.1.1.0
路由器B:
routerB(config)# int fa0/0
routerB(config-if)# ip address 152.1.1.2 255.255.255.0
routerB(config-if)# no shutdown
routerB(config)# int s2/1
routerB(config-if)# ip address 192.1.1.2 255.255.255.0
routerB(config-if)# no shutdown
routerB(config-if)# no fair-queue
routerB(config)# int s2/2
routerB(config-if)# ip address 193.1.1.2 255.255.255.0
routerB(config-if)# no shutdown
routerB(config)# router eigrp 64
routerB(config-router)# net 192.1.1.0
routerB(config-router)# net 193.1.1.0
routerB(config-router)# net 152.1.0.0
路由器C:
routerC(config)# int lo 0
routerC(config-if)# ip address 3.3.3.3 255.255.255.0
routerC(config-if)# no shutdown
routerC(config)# int s2/1
routerC(config-if)# ip address 193.1.1.1 255.255.255.0
% 193.1.1.0 overlaps with Loopback0
routerC(config-if)# no shutdown
routerC(config)# router eigrp 64
routerC(config-router)# net 193.1.1.0
routerC(config-router)# net 3.0.0 .0
监测配置:
使 用命令show ip roué 显示在路由器A上的路由表。会看到有两条到网络3.0.0.0的路径:一条经过以太网接口,另一条经过串行接口。通过这两条到达网络的成本是不同的。但是 因为variance设为2,既然第二条道路的成本不比最优道路的两倍多,那么就使用这条道路。
到 达网络3.0.0.0的最优路径是经过以太网借口的,它的成本是2323456。因为两者都有cariance。而其任何到达网络3.0.0.0的路径的 成本都比4646912(2323456*2)少,那么就使用这条路径。因为通过串行接口的费用是2809856,它比4646912少,所以使用这条路 径。
routerA#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
152.1.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 152.1.1.0/24 is directly connected, FastEthernet0/0
D 152.1.0.0/16 is a summary, 00:32:19, Null0
D 3.0.0 .0/8 [90/2300416] via 152.1.1.2, 00:00:32, FastEthernet0/0
[90/2809856] via 192.1.1.2, 00:00:32, Serial2/1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Loopback0
D 10.0.0.0/8 is a summary, 00:32:17, Null0
D 193.1.1.0/24 [90/2172416] via 152.1.1.2, 00:00:35, FastEthernet0/0
[90/2681856] via 192.1.1.2, 00:00:35, Serial2/1
C 192.1.1.0/24 is directly connected, Serial2/1
使用命令show ip route 3.3.3.3在路由器A上显示到达3.3.3.3的路径。重点查看两条路径都被使用,在第一条路径旁有一个星号“*”。这个“*”表示下一个离开路由器A的包目标是3.3.3.3要使用这条路径。
routerA# show ip route 3.3.3 .3
Routing entry for 3.0.0.0/8
Known via "eigrp 64", distance 90, metric 2300416, type internal
Redistributing via eigrp 64
Last update from 192.1.1.2 on Serial2/1, 00:03:11 ago
Routing Descriptor Blocks:
* 152.1.1.2, from 152.1.1.2, 00:03:11 ago, via FastEthernet0/0
Route metric is 2300416, traffic share count is 60
Total delay is 25100 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
192.1.1.2, from 192.1.1.2, 00:03:11 ago, via Serial2/1
Route metric is 2809856, traffic share count is 49
Total delay is 45000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
在路由器A上,测试主机3.3.3.3是否连通。
routerA# ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 192/288/384 ms
现在在路由器A上运行命令show ip route 3.3.3.3显示到达主机3.3.3.3的路径。重点查看现在“*”在第二部分路径旁,因为路由器现在正在两条链路上负载均衡。这两条链路都是到网络3.0.0.0的。
routerA# show ip route 3.3.3 .3
Routing entry for 3.0.0.0/8
Known via "eigrp 64", distance 90, metric 2300416, type internal
Redistributing via eigrp 64
Last update from 192.1.1.2 on Serial2/1, 00:07:59 ago
Routing Descriptor Blocks:
152.1.1.2, from 152.1.1.2, 00:07:59 ago, via FastEthernet0/0
Route metric is 2300416, traffic share count is 60
Total delay is 25100 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
* 192.1.1.2, from 192.1.1.2, 00:07:59 ago, via Serial2/1
Route metric is 2809856, traffic share count is 49
Total delay is 45000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
使用路由器配置命令no variance取消路由器A上的variance命令
routerA# conf t
Enter configuration commands, one per line. End with CNTL/Z.
routerA(config)#router eigrp 64
routerA(config-router)#no variance
在路由器A上,使用命令show ip route 3.3.3.3显示到达主机3.3.3.3的路径,注意只使用了一条路径。这条路径有最低的度量值,也没有运行负载均衡。
routerA# show ip route 3.3.3 .3
Routing entry for 3.0.0.0/8
Known via "eigrp 64", distance 90, metric 2300416, type internal
Redistributing via eigrp 64
Last update from 152.1.1.2 on FastEthernet0/0, 00:02:32 ago
Routing Descriptor Blocks:
* 152.1.1.2, from 152.1.1.2, 00:02:32 ago, via FastEthernet0/0
Route metric is 2300416, traffic share count is 1
Total delay is 25100 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2

你可能感兴趣的:(职场,休闲,EIGRP,负载平衡)