我遇到了使LACP主干在Ubuntu 12.04.2 LTS上正常运行的问题。
我的设置是一个主机连接两个10Gbe接口到两个独立的Nexus 5548交换机,configurationvPC以启用多机箱LACP。 Nexus的configuration是根据思科的指导方针,Ubuntu的configuration按照https://help.ubuntu.com/community/UbuntuBonding
服务器连接到每个Nexus交换机上的端口Ethernet1 / 7,端口configuration完全相同,位于端口通道15中。端口通道15configuration为VPC 15,VPC输出看起来不错。 这些是简单的接入端口,即没有涉及801.1q中继。
图:
+----------+ +----------+ +----------+ +----------+ | client 1 |------| nexus 1 |------| nexus 2 |------| client 2 | +----------+ +----------+ +----------+ +----------+ | | | +--------+ | +----| server |----+ eth4 +--------+ eth5
当任一链路断开时,客户端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
现在,我相信我已经把问题隔离到了Linux端。 当处于up-up状态时,每个连接使用到服务器的本地链路传送数据包,如通过查看mac地址表所证实的。 我能够在服务器上看到的是来自每个客户端的数据包在ethX接口(来自eth4上的客户端1的数据包,来自eth4上的客户端2的数据包)上使用tcpdump -i ethX接收,但是当我运行tcpdump -i bond0我只能从任何一个主机(根据我上面所说的)进行通信。
我观察到ARP和ICMP(IP)stream量的相同行为; 当两个链路都处于工作状态时,客户端发生故障,当一个端口处于closures状态时(和ping一起工作),当我再次使能链路时,ping失败(数据包仍然在eth接口上接收,但不在bond0上)。
为了澄清,我在这个configuration中设置了多个服务器,并且都显示相同的症状,所以它似乎不是硬件相关的。
所以 – 弄清楚如何解决这是我正在处理的; 我的谷歌search迄今没有带来任何运气。
任何指针,高度赞赏。
的/ etc /networking/接口
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
的/ proc /净/结合/ 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
编辑:从Nexus添加configuration
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
编辑:添加来自nexus1上的非VPC端口通道的结果在同一台服务器上,在IP更改之前和之后(更改IP影响负载平衡algorithm)。 这仍然使用服务器上的相同设置。
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
改变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
我设法在Ubuntu工作的唯一LACPconfiguration是这样的:
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
即我不使用债券奴隶,而是债券主人。 我不知道有什么区别,但我发现这个configuration为我工作。
我没有任何问题与LACP在我的设置,虽然这是与1Gbenetworking。
另外,如果您仍然遇到问题,请尝试将两根电缆插入同一台交换机,并configurationLACP端口。 只是为了消除多机箱LACP问题的可能性。
问题不是在Linux端,而是在连接端,它是如何工作在vPCconfiguration。
要在nexus上configurationvPC,首先需要连接两个nexus交换机,并将该链路configuration为“peer-link”。
在正常情况下,当交换机到服务器的两条链路都处于状态,在vPC上configuration的vlan 11中的UPstream量被丢弃在对等链路上。
仅当vPC的一部分接口处于down状态时,才允许在peer-link上使用vlan 11中的stream量。
这是vPC如何在nexus交换机上工作。
要解决这个问题,你可以运行fabric-path,并在交换机nexus-1和nexus-2之间build立另一个连接。