Tol*_*lli 6 linux ubuntu bonding lacp etherchannel
我遇到了让 LACP 中继在 Ubuntu 12.04.2 LTS 上正常运行的问题。
我的设置是一台主机,通过两个 10 Gbe 接口连接到两个单独的 Nexus 5548 交换机,vPC 配置为启用多机箱 LACP。Nexus 配置符合 Cisco 指南,Ubuntu 配置符合https://help.ubuntu.com/community/UbuntuBonding
服务器连接到每个Nexus交换机上的端口Ethernet1/7,其端口配置相同并放置在Port-channel 15中。Port-channel 15配置为VPC 15,VPC输出看起来不错。这些是简单的接入端口,即不涉及 801.1q 中继。
图表:
+----------+ +----------+ +----------+ +----------+
| client 1 |------| nexus 1 |------| nexus 2 |------| client 2 |
+----------+ +----------+ +----------+ +----------+
| |
| +--------+ |
+----| server |----+
eth4 +--------+ eth5
Run Code Online (Sandbox Code Playgroud)
当任一链接关闭时,客户端 1 和 2 都能够访问服务器。但是,当我启动辅助链路时,使用新启用的链路连接到交换机的客户端无法访问服务器。请参阅下表了解状态转换和结果:
port states (down by means of "shutdown")
nexus 1 eth1/7 up up down up
nexus 2 eth1/7 down up up up
connectivity
client 1 - server OK OK OK FAIL
client 2 - server OK FAIL OK OK
Run Code Online (Sandbox Code Playgroud)
现在,我相信我已经将问题隔离到了 Linux 方面。当处于 up 状态时,每个 nexus 使用到服务器的本地链接来传递数据包,如通过查看 mac 地址表所验证的那样。我能够在服务器上看到的是,使用 tcpdump -i ethX 在 ethX 接口上接收来自每个客户端的数据包(来自 eth4 上的客户端 1 的数据包,来自 eth4 上的客户端 2 的数据包),但是当我运行 tcpdump 时-i bond0 我只能从任一主机进行通信(按照我上面所说的)。
我观察到 ARP 和 ICMP (IP) 流量的相同行为;当两个链接都打开时,来自客户端的 ARP 失败,当一个链接关闭时工作(与 ping 一起),当我再次启用链接时 ping 失败(仍然在 eth 接口上接收到数据包,但不是在 bond0 上)。
澄清一下,我在此配置中设置了多个服务器,并且所有服务器都显示相同的症状,因此它似乎与硬件无关。
所以 - 弄清楚如何解决这个问题就是我正在处理的问题;到目前为止,我的谷歌搜索并没有给我带来任何运气。
任何指针都受到高度赞赏。
/etc/网络/接口
auto eth4
iface eth4 inet manual
bond-master bond0
auto eth5
iface eth5 inet manual
bond-master bond0
auto bond0
iface bond0 inet static
address 10.0.11.5
netmask 255.255.0.0
gateway 10.0.0.3
mtu 9216
dns-nameservers 8.8.8.8 8.8.4.4
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
#bond-slaves eth4
bond-slaves eth4 eth5
Run Code Online (Sandbox Code Playgroud)
/proc/net/bonding/bond0
A little further information:
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 1
Actor Key: 33
Partner Key: 1
Partner Mac Address: 00:00:00:00:00:00
Slave Interface: eth4
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 8
Permanent HW addr: 90:e2:ba:3f:d1:8c
Aggregator ID: 1
Slave queue ID: 0
Slave Interface: eth5
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 13
Permanent HW addr: 90:e2:ba:3f:d1:8d
Aggregator ID: 2
Slave queue ID: 0
Run Code Online (Sandbox Code Playgroud)
编辑:从 Nexus 添加配置
vpc domain 100
role priority 4000
system-priority 4000
peer-keepalive destination 10.141.10.17 source 10.141.10.12
peer-gateway
auto-recovery
interface port-channel15
description server5
switchport access vlan 11
spanning-tree port type edge
speed 10000
vpc 15
interface Ethernet1/7
description server5 internal eth4
no cdp enable
switchport access vlan 11
channel-group 15
Run Code Online (Sandbox Code Playgroud)
编辑:在 IP 更改之前和之后(更改 IP 以影响负载平衡算法)为同一服务器添加了来自 nexus1 上的非 VPC 端口通道的结果。这仍然在服务器上使用相同的设置。
port states (down by means of "shutdown")
nexus 1 eth1/7 up up down up
nexus 1 eth1/14 down up up up <= port moved from nexus 2 eth1/7
connectivity (sever at 10.0.11.5, hashing uses Eth1/14)
client 1 - server OK OK OK FAIL
client 2 - server OK OK OK FAIL
Run Code Online (Sandbox Code Playgroud)
更改IP后的结果如预期;未使用的接口被启动会导致失败。
connectivity (sever at 10.0.11.15, hashing uses Eth1/7)
client 1 - server OK FAIL OK OK
client 2 - server OK FAIL OK OK
Run Code Online (Sandbox Code Playgroud)
我在 Ubuntu 中成功使用的唯一 LACP 配置是:
auto bond0
iface bond0 inet dhcp
bond-mode 4
bond-slaves none
bond-miimon 100
bond-lacp-rate 1
bond-updelay 200
bond-downdelay 200
auto eth0
iface eth0 inet manual
bond-master bond0
auto eth1
iface eth1 inet manual
bond-master bond0
Run Code Online (Sandbox Code Playgroud)
即我不使用债券奴隶,而是使用债券主人。我不确定有什么区别,但我发现这个配置对我有用。
尽管这是 1Gbe 网络,但我的设置下的 LACP 没有任何问题。
此外,如果仍然遇到问题,请尝试将两根电缆插入同一交换机并为 LACP 配置端口。只是为了消除多机箱 LACP 出现问题的可能性。
归档时间: |
|
查看次数: |
13796 次 |
最近记录: |