ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 3603|回复: 8

EIGRP非等价带宽的负载均衡

[复制链接]
发表于 2014-8-8 16:54:29 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x



1. 路由器sibo1的配置

sibo1(config)#no ip cef

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                                   



35 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 ip cef

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 – 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 - 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                                 



36      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 ip eigrp 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                                 



37 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 *  4 msec *  4 msec *  

    192.168.1.2 8 msec                                 



38     172.16.1.2 4 msec *  4 msec *  12 msec *  

    192.168.1.2 8 msec



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

评分

参与人数 1 +3 收起 理由
爱普信 + 3 赞一个!

查看全部评分

您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2025-6-19 13:06 , Processed in 0.192158 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表