实验要求:

        1.路由器名为sibo1sibo2

        2.两路由器用双绞线(10M)和串行线连接(1.544M)相连接;

        3.使用命令实现非等价负载均衡。

        4.验证非等价负载均衡

13.jpg

实验过程:

注:请先关闭路由的快速转发功能,以免影响实验结果

1.      路由器sibo1的配置

sibo1(config)#no ipcef

sibo1(config)#interface ethernet 0                      

sibo1(config-if)#ip address 172.16.1.1 255.255.255.0  

sibo1(config-if)#exit

sibo1(config)#interface serial 0                      

sibo1(config-if)#ip address 192.168.1.1 255.255.255.0 

sibo1(config-if)#no shutdown                          

sibo1(config-if)#exit

sibo1(config)#interface loopback 0              

sibo1(config-if)#ip address 1.1.1.1 255.255.255.0    

 

sibo1(config)#router eigrp 100                  

sibo1(config-router)#network 192.168.1.0         

sibo1(config-router)#network 172.16.1.0

sibo1(config-router)#network 1.1.1.0         

sibo1(config-router)#no auto-summary  

 

sibo2(config)#no ipcef

sibo2(config-if)#interface serial 0                  

sibo2(config-if)#ip address 192.168.1.2 255.255.255.0

sibo2(config-if)#clock rate 64000                

sibo2(config-if)#no shutdown                         

sibo2(config-if)#exit

sibo2(config)#interface ethernet 0                   

sibo2(config-if)#ip address 172.16.1.2 255.255.255.0 

sibo2(config-if)#exit

sibo2(config)#interface loopback 0               

sibo2(config-if)#ip address 2.2.2.2 255.255.255.0    

 

sibo2(config)#router eigrp 100                   

sibo2(config-router)#network 192.168.1.0           

sibo2(config-router)#network 172.16.1.0                       

sibo2(config-router)#network 2.2.2.0                

sibo2(config-router)#no auto-summary            

 

2.查看路由表

sibo1#sh ip route

04:24:23: %SYS-5-CONFIG_I: Configured from console by consoleute

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B – BGPD - 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 – EGPi - 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 - ODRP - periodic downloaded static route

 

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/409600] via 172.16.1.2, 00:00:16, Ethernet0

      172.16.0.0/24 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, Ethernet0

C    192.168.1.0/24 is directly connected, Serial0

注:到达目的网段只能经过以太网线路,路由器认为走这条路径最优

 

3.查看拓扑表

sibo1#show ipeigrp topology

IP-EIGRP Topology Table for AS(100)/ID(1.1.1.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

       r - reply Status, s - sia Status

P 1.1.1.0/24, 1 successors, FD is 128256

via Connected, Loopback0

P 2.2.2.0/24, 1 successors, FD is 409600

via 172.16.1.2 (409600/128256), Ethernet0

via 192.168.1.2 (2297856/128256), Serial0

P 192.168.1.0/24, 1 successors, FD is 2169856

via Connected, Serial0

P 172.16.1.0/24, 1 successors, FD is 281600

via Connected, Ethernet0

注:查看EIGRP的拓扑表。409600这个参数指的是可行距离,就是本地路由器到达目的网段的度量值。128256这个参数指的是通告距离,就是邻居路由器到达目的网段的度量值。

 

问题分析:从上可以看出,经过以太网线路的度量值约为41万,而经过serial线的度量值约为229万,根据度量值越小越优先的原则,路由器会选取41万度量值的这个条路加入到路由表中。在EIGRP的路由表中,为了可以进行非等价的负载均衡,我们必须要把serial线这个路径加入到路由表中。

EIGRP协议中,有variance(因子值)这个参数,它的含义是把最优路径乘以这个因子值,以让次优路径可以加入到路由选择表中。现在的最优路径为41万,次优路径为229万,那么41*5=205万,度量值依然还是小于229万的,那么serial线这条路径还是加入不到路由表中,而41*6=246万,正好大于229万,那么我们就选取6作为我们的因子值。

 

4.设置eigrp的因子值

sibo1(config)#router eigrp 100

sibo1(config-router)#variance 6

sibo1(config-router)#end

sibo1#clear ip route *

sibo1#show ip route

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

2.0.0.0/24 is subnetted, 1 subnets

D      2.2.2.0 [90/409600] via 172.16.1.2, 00:00:01, Ethernet0

              [90/2297856] via 192.168.1.2, 00:00:01, Serial0

注:现在一个路由标目对应着2个出站接口,就可以进行非等价负载均衡了

 172.16.0.0/24 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, Ethernet0

C    192.168.1.0/24 is directly connected, Serial0

 

sibo2(config)#router eigrp 100

sibo2(config-router)#variance 6

sibo2(config-router)#end  

sibo2#clear ip route *

sibo2#sh ip route

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

D      1.1.1.0 [90/409600] via 172.16.1.1, 00:00:01, Ethernet0

              [90/2297856] via 192.168.1.1, 00:00:01, Serial0

2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     172.16.0.0/24 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, Ethernet0

C    192.168.1.0/24 is directly connected, Serial0

5.验证效果

sibo1#traceroute  -----------进行路由跟踪

Protocol [ip]:

Target IP address: 2.2.2.2-----目的地址

Source address: 1.1.1.1--------源地址

Numeric display [n]:

Timeout in seconds [3]:

Probe count [3]: 20------------一共发送20个包

Minimum Time to Live [1]:

Maximum Time to Live [30]:

Port Number [33434]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Type escape sequence to abort.

Tracing the route to 2.2.2.2

  1 172.16.1.2 4 msec*  4msec *  4 msec *

    192.168.1.2 8 msec

    172.16.1.2 4 msec*  4msec *  12 msec *

    192.168.1.2 8 msec

注:以太网线走了6个包,其中“*”也算一个包。Serial线走了1个包。


 

设为首页 | 加入收藏 | 邮箱登陆    南京君诺鑫成网络科技有限公司版权所有 Copyright © 2008-2014  ICP备案号:苏ICP备10109038号

地址: 江苏省南京市珠江路435号华海大厦709室   邮编: 210018   电话: (86)25-83156292(10线)   传真: (86)25-83156290   邮箱: master@junovation.com