eigrp不等价负载均衡

 

 

 

1、实验目的:使从R1 到达172.16.4.0的网段上经过两条链线,且不等价的均衡负载

 

2、拓扑图如果下:

 

 

3、下面开始基本配置(PC1与PC2的IP地址及其网关地址的配置在此略过!!):

3.1 R1与 R2的基本配置:

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host r1
r1(config)#
r1(config)#no ip domain-lookup
r1(config)#line console 0
r1(config-line)#logging synchronous
r1(config-line)#exec-timeout 0 0
r1(config-line)#end
r1#
r1#
00:02:31: %SYS-5-CONFIG_I: Configured from console by console
r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r1(config)#int f0/0
r1(config-if)#ip addr 172.16.1.254 255.255.255.0
r1(config-if)#no shut
r1(config-if)#
00:06:50: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:06:51: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
r1(config-if)#int s1/0
r1(config-if)#cl
r1(config-if)#clock ra
r1(config-if)#clock rate 64000
r1(config-if)#ip addr 172.16.2.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#int s1/1
00:07:38: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
r1(config-if)#int s1/1
r1(config-if)#
00:07:39: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r1(config-if)#cl
r1(config-if)#clock ra
r1(config-if)#clock rate 64000
r1(config-if)#ip addr 172.16.3.1 255.2
00:08:01: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
r1(config-if)#ip addr 172.16.3.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#
00:08:12: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r1(config-if)#
00:08:13: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r1(config-if)#
00:08:41: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
r1(config-if)#
00:09:51: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r1(config-if)#
00:10:31: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r1(config-if)#exit
r1(config)#ro
r1(config)#router ei
r1(config)#router eigrp 100
r1(config-router)#no au
r1(config-router)#no auto-summary
r1(config-router)#net
r1(config-router)#network 172.16.1.0 0.0.0.255
r1(config-router)#network 172.16.2.0 0.0.0.255
r1(config-router)#network 172.16.3.0 0.0.0.255
r1(config-router)#^Z

r1#

 

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host r2
r2(config)#
r2(config)#no ip domain-lookup
r2(config)#line console 0
r2(config-line)#logging synchronous
r2(config-line)#exec-timeout 0 0
r2(config-line)#end
r2#
r2#
00:02:55: %SYS-5-CONFIG_I: Configured from console by console
r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#int f0/0
r2(config-if)#ip addr 172.16.4.254 255.255.255.0
r2(config-if)#no shut
r2(config-if)#int s1/0
00:09:16: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:09:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
r2(config-if)#int s1/0
r2(config-if)#ip addr 172.16.2.2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#int s1/1
r2(config-if)#
00:09:37: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
00:09:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r2(config-if)#ip addr 172.16.3.2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#
00:10:16: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r2(config)#
00:10:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config)#ro
r2(config)#router ei
r2(config)#router eigrp 100
r2(config-router)#no au
r2(config-router)#no auto-summary
r2(config-router)#net
r2(config-router)#network 172.16.2.0 0.0.0.255
r2(config-router)#network 172.16.3.0 0.0.0.255
r2(config-router)#network 172.16.4.0 0.0.0.255
r2(config-router)#^Z
r2#

 

3.2还没有配置variance的值时,两条链路是等价链路,如下所示:

r1#sh ip ro
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, 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

     172.16.0.0/24 is subnetted, 4 subnets
D       172.16.4.0 [90/2172416] via 172.16.2.2, 00:00:08, Serial1/0
                   [90/2172416] via 172.16.3.2, 00:00:08, Serial1/1
C       172.16.1.0 is directly connected, FastEthernet0/0
C       172.16.2.0 is directly connected, Serial1/0
C       172.16.3.0 is directly connected, Serial1/1

 

3.3下面配置不等价负载均衡链路

r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r1(config)#int s1/0
r1(config-if)#int s1/1
r1(config-if)#ban
r1(config-if)#bandwidth 115   //改变R1的s1/1口的带宽为115kb/s
r1(config-if)#^
r1#

 

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config-if)#int s1/1
r2(config-if)#bandwidth 115     //改变R2的s1/1口的带宽为115kb/s
r2(config-if)#^Z
r2#

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#int f0/0

r2(config-if)#delay 100  //更改为100*10 usec,此处为100,化为微秒要乘10

 

//通过上面配置后,发现两条链路的FD值发生了变化,如下所示:

r1#sh ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(172.16.3.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 172.16.4.0/24, 1 successors, FD is 2172416
         via 172.16.2.2 (2195456/51200), Serial1/0
         via 172.16.3.2 (22798336/51200), Serial1/1
P 172.16.1.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/0
P 172.16.2.0/24, 1 successors, FD is 2169856
         via Connected, Serial1/0
P 172.16.3.0/24, 1 successors, FD is 22772736
         via Connected, Serial1/1

 

 

r1#sh ip ro
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, 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

     172.16.0.0/24 is subnetted, 4 subnets
D       172.16.4.0 [90/2195456] via 172.16.2.2, 00:00:17, Serial1/0  //另外那条没有进入路由表
C       172.16.1.0 is directly connected, FastEthernet0/0
C       172.16.2.0 is directly connected, Serial1/0
C       172.16.3.0 is directly connected, Serial1/1

 

 

r1(config)#router eigrp 100

r1(config-router)#variance 11  //由上面的数值可知 22798336/2195456=10.38(向上取整为11)
r1(config-router)#^Z
r1#

 

3.4下面验证:

r1#clear ip route *   //一定要清除原来的路由,不然无法看到我们的配置结果!!
r1#sh ip ro
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, 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

     172.16.0.0/24 is subnetted, 4 subnets
D       172.16.4.0 [90/2195456] via 172.16.2.2, 00:00:03, Serial1/0   //两条路由并且FD值是不同的
                   [90/22798336] via 172.16.3.2, 00:00:03, Serial1/1
C       172.16.1.0 is directly connected, FastEthernet0/0
C       172.16.2.0 is directly connected, Serial1/0
C       172.16.3.0 is directly connected, Serial1/1

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值