BSCI—2:EIGRP非等价负载均衡

 BSCI—2:EIGRP非等价负载均衡


 
在作实验以前我想先解释一下实现EIGRP负载的一些知识()!
 
一:思考
若是 R1 想去去往 R5 的话,那么它面临着有 3 条路能够走,可是咱们能够请注意到, 3 条路的度量值是不同的,因此度量值不同即不能实现负载均衡,因而 R1 就会选择 R3 作为它的下一跳,把它放入路由表当中 , 那咱们怎样实现非等价负载呢(即带宽不一致的状况)?
 
二:术语
AD Advertise Distance : 宣告距离 (邻居到某网络的距离)   
FD (Feasible Distance) :可行距离    (本身到某网络的距离)
如图所示 : 若是 R1 R3 R5 ,那么它的 AD=10 FD=20.
 
注:这个必定得搞清,否则接下来都不知道我讲什么 .
 
三:条件
 
1.    若是我在 R1 配置 R1 config-router #variance 2 的话,那么 R2 会作为 R1 的另外一条去住 R5 的路径,由于 2* FD > 20+10=30 ),即从 R2 R5 FD 小于 R3 R5 FD ,因此才能实现负载 .
 
2. 若是我 variance 设置为 3 的话,那么按我刚刚所说的从 R4 R5 FD 也小于 2* FD ),那它会被加入的负载路径里面去吗?答案确定不会,由于还有一个条件就是AD必需小于FD,从R4到R5的AD为25,而从R3到R5的FD为20, 因此不知足,不能实现负载 .
 
 
 
实验:拓扑以下
 
 
注:首先说明一下,因为 51CTO 只容许写 8 万字,因此步骤一只写了 R1 的配置,其它同样
 
步骤一:首先先把因此接口信息以及EIGRP 所有启用,而且查看信息 .
 
R1:
 
Router>
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.12.0 0.0.0.255
R1(config-router)#network 192.168.13.0 0.0.0.255
R1(config-if)#end
R1#
 
 
 
 
 
R1 上查看路由表:
 
R1#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
 
     4.0.0.0/24 is subnetted, 1 subnets
D       4.4.4.0 [90/158720] via 192.168.13.2, 00:00:06, FastEthernet0/1
                [90/158720] via 192.168.12.2, 00:00:06, FastEthernet0/0
C    192.168.12.0/24 is directly connected, FastEthernet0/0
C    192.168.13.0/24 is directly connected, FastEthernet0/1
D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:04:00, FastEthernet0/0
D    192.168.34.0/24 [90/30720] via 192.168.13.2, 00:03:50, FastEthernet0/1
R1#
 
注:很清楚的看到,去往4.4.4.4 有两条路能够走,由于其度量值同样,EIGRP 自动实现负载均衡,
 
 
 
 
 
步骤二: R1 设置F0/1 接口带宽为 512KB ,其两边度量值不同,使得因此数据只向 F0/0 转发 , 产查看路由表与拓扑表 .
 
R1(config)#interface f0/1
R1(config-if)#bandwidth 512
R1(config-if)#end
R1#
 
 
查看路由表:
 
R1#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
 
     4.0.0.0/24 is subnetted, 1 subnets
D       4.4.4.0 [90/158720] via 192.168.12.2, 00:08:43, FastEthernet0/0
C    192.168.12.0/24 is directly connected, FastEthernet0/0
C    192.168.13.0/24 is directly connected, FastEthernet0/1
D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:12:37, FastEthernet0/0
D    192.168.34.0/24 [90/33280] via 192.168.12.2, 00:01:04, FastEthernet0/0
R1#
 
//这里由于改变F0/1 了带宽,因此去住4.4.4.4 所有往F0/0 转发 . 只有一条 .
 
 
 
 
 
步骤三:实现非等价负载均衡
 
R1(config)#router eigrp 1
R1(config-router)#variance 32    //    32=5133056 除以158720,知足条件.
 
查看路由表:
 
R1#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
 
     4.0.0.0/24 is subnetted, 1 subnets
D       4.4.4.0 [90/5133056] via 192.168.13.2, 00:00:02, FastEthernet0/1
                [90/158720] via 192.168.12.2, 00:00:01, FastEthernet0/0
C    192.168.12.0/24 is directly connected, FastEthernet0/0
C    192.168.13.0/24 is directly connected, FastEthernet0/1
D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:00:01, FastEthernet0/0
D    192.168.34.0/24 [90/30720] via 192.168.13.2, 00:00:02, FastEthernet0/1
R1#
 
// 去往4.4.4.4 的路由,又变成了两条 .
 
 
实验完毕 .
相关文章
相关标签/搜索