华为S5700 和 cisco6500 做 ETH-trunk 双链路捆绑拔插任意一条线都丢8个包,这个问题是项目做好很久之后一次偶然线路问题发现的。。。

华为与思科

拓扑(懒得画图):

A(C2960)===》B(S5700) 通过 ETH-trunk 1 做链路捆绑 B(S5700)===》C(C6500) 通过 ETH-trunk 2 做链路捆绑 都是通
过 2 层互联都是双链路.

配置:

C2960
Switch#sh run int port-channel 1 
Building configuration... 
Current configuration : 54 bytes 
! 
interface Port-channel1 
switchport mode trunk 
end 

Switch#sh run int g0/47 
Building configuration... 

Current configuration : 85 bytes 
! 
interface GigabitEthernet0/47 
switchport mode trunk 
channel-group 1 mode on 
end 

Switch#sh run int g0/48 
Building configuration... 

Current configuration : 85 bytes 
! 
interface GigabitEthernet0/48 
switchport mode trunk 
channel-group 1 mode on 
End 
S5700
\# 
interface Eth-Trunk1 
port link-type trunk 
port trunk allow-pass vlan 2 to 4094 
bpdu enable 
\# 
interface Eth-Trunk2 
port link-type trunk 
port trunk allow-pass vlan 2 to 4094 
bpdu enable 
\# 
interface GigabitEthernet0/0/1 
eth-trunk 1 
undo ntdp enable                         
undo ndp enable 
\# 
interface GigabitEthernet0/0/2 
eth-trunk 1 
undo ntdp enable 
undo ndp enable 
\# 
\# 
interface GigabitEthernet0/0/13 
eth-trunk 2 
undo ntdp enable 
undo ndp enable 
\# 
interface GigabitEthernet0/0/14 
eth-trunk 2 
undo ntdp enable 
undo ndp enable 
\# 
C6500
BJ-BS02-6509#sh run int port-channel 100 
Building configuration... 
Current configuration : 142 bytes 
! 
interface Port-channel100 
description to test 
no ip address 
switchport 
switchport trunk encapsulation dot1q 
switchport mode trunk 
end 
BJ-BS02-6509#sh run int g2/41 
Building configuration... 

Current configuration : 173 bytes 
! 
interface GigabitEthernet2/41 
description to test 
no ip address 
switchport 
switchport trunk encapsulation dot1q 
switchport mode trunk 
channel-group 100 mode on 
end 

BJ-BS02-6509#sh run int g2/42 

Building configuration... 

Current configuration : 173 bytes 
! 
interface GigabitEthernet2/42 
description to test 
no ip address 
switchport 
switchport trunk encapsulation dot1q 
switchport mode trunk 
channel-group 100 mode on 
end 

故障现象描述:

A 下的主机 ping C 上的一个 ip 地址在捆绑做完配置候(未断线)通不丢包
当断 AB 之间的一条链路丢 2 个包(拔插各一个正常)
当断 BC 之间一条链路的时候丢 8 个包(拔插各 8 个不正常)

处理过程

检查配置基本没有问题:换场景测试我们把 A 接 B 的口和 C 接 B 的口对调配置不变断线 ping
结果还是和开始一样在断 BC 链路的时候丢包 8 个(拔插各八个不正常)
Cisco A 和 C 直接对接 ping 断线测试(配置不变)拔插各丢一个包正常
通过拨打 400 客服(单号 2814229)给他说明情况和捆绑配置同时他让做了流量统计他们给出初步
结论(57 和 65 之间物理线路问题接口问题以及不同厂商兼容问题)

继续排查:

保持上面的配置不变继续测试(捆绑接口都是放行 vlan all)
通过上面的排查基本可以确定问题在 B 到 C 这两个交换机上。
故先测 B 到 C 之间捆绑链路是否有问题:

情景一
  • 在 B 交换机 S5700 上接了一个 pc 机把该接口划分在业务 vlan 下 ping 自己在 Cisco 交换机 6500上的网关
  • 现象: 不断线不丢包 断其中任意一条线丢 8 个包(拔线时丢 8 个再把链路恢复插上的时候也丢 8 个)
情景二
在交换机 B s5700 上配置了一个 vlanif 接口也是用该接口地址直接 ping cisco 交换机 6500 上的网关
  • 现象: 不断线不丢包 断其中任意一条线丢一个包(拔插个一个)
  • 得出结论:B 和 C 也就是 S5700 和 cisco6500 之间的捆绑链路没有问题
情景三
  • 我们又在交换机 A 上配了一个 vlanif 接口用该地址 ping C 交换机 cisco6500 上的网关地址
  • 现象: 不断线不丢包 断 A 和 B 之间的链路一根线丢 1 个包(拔的时候丢 1 个再插上丢一个) 断 B 和 C 之间链路任意一根线丢 8 个包(拔插各 8 个包)
情景四
  • 用 A 上的 vlanif 地址 ping B 交换机上的 vlanif 地址

    现象:
  • 不断线不丢包 断 A 和 B 之间任意一条链路丢一个包(拔插各一个)
  • 得出结论:可能业务 vlan 的问题,但是我们都是放行所有 vlan 和技术以及华为 400 沟通之后捆绑
  • 接口不放行所有 vlan 只放行业务 vlan

修改配置:

S5700
\# 
interface Eth-Trunk1 
port link-type trunk 
port trunk allow-pass vlan 4 999 
bpdu enable 
\# 
interface Eth-Trunk2 
port link-type trunk 
port trunk allow-pass vlan 4 999 
bpdu enable 
在 A 和 C 上也只放行业务 vlan 4 999 

测试:把两台 pc 接在交换机 A c2960 上分别归在 vlan4 和 vlan999 然后 ping C 交换机 cisco6500
上的网关地址

现象:
不断线不丢包 断 A 和 B 之间的任意一条链路丢一个包(拔插个一个) 断 B 和 C 之间的任意一条链路个丢一个包(拔插个一个)
A 和 B 与 B 和 C 之间链路各任意断一条丢两个包(拔插各两个)
该测试现象正常

把现象反馈给 400 技术沟通得出结论:不同厂商之间兼容性问题,还有就是放行 vlan all 不安全容
易出问题实际工程中几乎不这样做 主要结论归结不同厂商 BUG。

小结

1.可能配置出错,物理线路有问题,接口模块问题,工作速率工作模式(全双工半双工)不同厂
商之间兼容性问题还有就是放行 vlan。。。。
2.在配置链路捆绑的时候我们尽量不要放行 vlan all 这样安全性低以及容易出错,只需要具体
放行业务 vlan 就可以了,同时与异厂商做对接时的明白设备通用协议考虑到兼容性问题。

Last modification:April 13, 2019
If you think my article is useful to you, please feel free to appreciate