取消
显示结果 
搜索替代 
您的意思是: 
cancel
5111
查看次数
30
有帮助
4
评论
lelwu
Cisco Employee
Cisco Employee
涉及设备平台:Cisco Catalyst 6500, 4500, 2960, 3750, 3750G,3750X, and 3560 Series Switches.
背景:
Etherchannel load-balance工作是基于所配置的对于不同流量的哈希算法所得到的0-78个哈希值的。哈希的结果我们叫做 Result Bundle Hash RBH
注意哈希值是根据我们所配置的load-balancing 的算法来确定的。下面是一个例子:
Source 192.168.1.1 (mac a.a.a ) sending a tcp stream to 172.16.1.1 ( mac b.b.b )
with a source tcp port of 50 and destination port 2000
Source 192.168.1.1 (mac a.a.a ) sending a tcp stream to 209.165.201.1 ( mac c.c.c )
with a source tcp port of 60 and destination 2000.
If configured load balancing algorithm is SRC_MAC
Then no of flows = 1
If configured load balancing algorithm is DST_MAC
Then no of flows = 2
If configured load balancing algorithm is DST_PORT
Then no of flows= 1
Catalyst 6500 系列:
1, 查在用的load-balance算法
2, 进入switch processor SP),敲show etherchannel load-balance:
6500#remote login sw
Trying Switch ...
Entering CONSOLE for Switch
Type "^C^C^C" to end this session
6500−sp#show etherchannel load−balance
EtherChannel Load−Balancing Configuration:
src−dst−ip
mpls label−ip
3, 查具体某一条flowRBH 值:
6500−sp#test etherchannel load−balance interface port−channel
在上面的例子中,这条flow是在192.168.1.1 172.16.1.1,问题中的Portchannelport-channel 1。如果我们配置的算法是基于src-dst ip 的,那我们就填入源目IP 192.168.1.1 172.16.1.1
6500−sp#test etherchannel load−balance int port−channel 1 ip 192.168.1.1 172.16.1.1
Computed RBH: 0x5
Would select Gi3/2 of Po1
4 在一些IOS中是不会去显示流量从哪个具体物理接口的,可以使用如下的方法:
RPconsole中敲show interface port−channel etherchannel 然后再按照下面的方法计算出来是哪个物理端口:
6500#show interface port−channel 1 etherchannel
Port−channel1 (Primary aggregator)
Age of the Port−channel = 0d:01h:05m:54s
Logical slot/port = 14/1 Number of ports = 2
HotStandBy port = null
Port state = Port−channel Ag−Inuse
Protocol = LACP
Fast−switchover = disabled
Ports in the Port−channel:
Index Load Port EC state No of bits
−−−−−−+−−−−−−+−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−
0 55 Gi3/1 Active 4
1 AA Gi3/2 Active 4
在输出中load一栏可以看到两个Portchannel中的接口分别为55 AA
我们分别将55AA转换为2进制后,用下面的方法来确定RBH值对应的物理接口是哪个:

161832zplor5ol5llppc5f.png
像上面这样,AA对应的2进制是1010 101055对应的是0101 0101 。然后再从7-0进行匹配,对应1的就是该接口所对应的RBH值。
在上面例子中,G3/2对应的RBH值为:1 3 5 7G3/1对应的是0 2 4 6
这样我们再得到RBH值之后就能够用这种方法匹配出对应接口。
Catalyst 4500 系列交换机:
1 检查load-balancing算法: show etherchannel load-balance
2 用如下命令查看:
4500#show platform software etherchannel port−channel 1 map ip 192.168.1.1 172.16.1.1
Map port for IP 192.168.1.1, 172.16.1.1 is Gi3/1(Po1)
NOTE: Software forwarded traffic uses Gi3/1(Po1)
Catalyst 3750 系列交换机:
使用如下命令:
test etherchannel load−balance interface port−channel
举个例子:
3750(config)#port−channel load−balance src−dst−ip
3750#show etherchannel load−balance
EtherChannel Load−Balancing Configuration:
src−dst−ip
3750#test etherchannel load−balance interface port−channel 1 ip 192.168.1.1 172.16.1.1
Would select Gi3/1 of Po1
如果算法是基于MAC地址的,根据源目MAC也可以用该命令找到物理端口。
在论坛中还有另外一个同事share的类似的帖子可以去参考:
http://bbs.csc-china.com.cn/forum.php?mod=viewthread&tid=16873&extra=page%3D1
评论
blgao
Cisco Employee
Cisco Employee
谢谢分享。。
xupeng
Cisco Employee
Cisco Employee
谢谢楼主分享
Luke Huang
Cisco Employee
Cisco Employee
forteibj
Community Member
谢谢分享 谢谢分享
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接