linux – LACP有2个NIC,当其中任何一个关闭时工作,而不是两个都工作时

前端之家收集整理的这篇文章主要介绍了linux – LACP有2个NIC,当其中任何一个关闭时工作,而不是两个都工作时前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我遇到了让LACP中继在Ubuntu 12.04.2 LTS上正常运行的问题.

我的设置是单个主机,连接两个10 Gbe接口连接到两个独立的Nexus 5548交换机,vPC配置为启用多机箱LACP. Nexus配置符合Cisco指南,Ubuntu配置符合https://help.ubuntu.com/community/UbuntuBonding

服务器连接到每个Nexus交换机上的端口Ethernet1 / 7,其端口配置相同并放置在端口通道15中.端口通道15配置为VPC 15,VPC输出看起来很好.这些是简单的访问端口,即不涉及801.1q中继.

图:

  1. +----------+ +----------+ +----------+ +----------+
  2. | client 1 |------| nexus 1 |------| nexus 2 |------| client 2 |
  3. +----------+ +----------+ +----------+ +----------+
  4. | |
  5. | +--------+ |
  6. +----| server |----+
  7. eth4 +--------+ eth5

当任一链接断开时,客户端1和2都能够到达服务器.但是,当我启动辅助链接时,使用新启用的链接连接到交换机的客户端无法访问服务器.
有关状态转换和结果,请参见下表:

  1. port states (down by means of "shutdown")
  2. nexus 1 eth1/7 up up down up
  3. nexus 2 eth1/7 down up up up
  4.  
  5. connectivity
  6. client 1 - server OK OK OK FAIL
  7. client 2 - server OK FAIL OK OK

现在,我相信我已经将问题分离到了Linux方面.当处于up-up状态时,每个nexus使用到服务器的本地链接来传递数据包,如通过查看mac地址表所验证的那样.我在服务器上看到的是,通过使用tcpdump -i ethX,ethX接口(来自eth4上的客户端1的数据包,来自eth4上的客户端2的数据包)收到来自每个客户端的数据包,但是当我运行tcpdump时-i bond0我只能从主机中的任何一个进行流量传输(根据我上面所说的).

我观察到ARP和ICMP(IP)流量的相同行为;当两个链路都启动时,ARP从客户端发生故障,当一个链路断开时,工作(连同ping),当我再次启用链接时ping失败(仍然在eth接口上接收数据包,但不在bond0上接收).

为了澄清,我在这个配置中设置了多个服务器,并且都显示相同的症状,因此它似乎与硬件无关.

所以 – 弄清楚如何解决这个问题就是我正在处理的事情;到目前为止,谷歌搜索还没给我带来任何好运.

任何指针都非常感谢.

的/ etc /网络/接口

  1. auto eth4
  2. iface eth4 inet manual
  3. bond-master bond0
  4.  
  5. auto eth5
  6. iface eth5 inet manual
  7. bond-master bond0
  8.  
  9. auto bond0
  10. iface bond0 inet static
  11. address 10.0.11.5
  12. netmask 255.255.0.0
  13. gateway 10.0.0.3
  14. mtu 9216
  15. dns-nameservers 8.8.8.8 8.8.4.4
  16. bond-mode 4
  17. bond-miimon 100
  18. bond-lacp-rate 1
  19. #bond-slaves eth4
  20. bond-slaves eth4 eth5

的/ proc /净/结合/ bond0

  1. A little further information:
  2. Ethernet Channel Bonding Driver: v3.7.1 (April 27,2011)
  3.  
  4. Bonding Mode: IEEE 802.3ad Dynamic link aggregation
  5. Transmit Hash Policy: layer2 (0)
  6. MII Status: up
  7. MII Polling Interval (ms): 100
  8. Up Delay (ms): 0
  9. Down Delay (ms): 0
  10.  
  11. 802.3ad info
  12. LACP rate: fast
  13. Min links: 0
  14. Aggregator selection policy (ad_select): stable
  15. Active Aggregator Info:
  16. Aggregator ID: 1
  17. Number of ports: 1
  18. Actor Key: 33
  19. Partner Key: 1
  20. Partner Mac Address: 00:00:00:00:00:00
  21.  
  22. Slave Interface: eth4
  23. MII Status: up
  24. Speed: 10000 Mbps
  25. Duplex: full
  26. Link Failure Count: 8
  27. Permanent HW addr: 90:e2:ba:3f:d1:8c
  28. Aggregator ID: 1
  29. Slave queue ID: 0
  30.  
  31. Slave Interface: eth5
  32. MII Status: up
  33. Speed: 10000 Mbps
  34. Duplex: full
  35. Link Failure Count: 13
  36. Permanent HW addr: 90:e2:ba:3f:d1:8d
  37. Aggregator ID: 2
  38. Slave queue ID: 0

编辑:从Nexus添加配置

  1. vpc domain 100
  2. role priority 4000
  3. system-priority 4000
  4. peer-keepalive destination 10.141.10.17 source 10.141.10.12
  5. peer-gateway
  6. auto-recovery
  7. interface port-channel15
  8. description server5
  9. switchport access vlan 11
  10. spanning-tree port type edge
  11. speed 10000
  12. vpc 15
  13. interface Ethernet1/7
  14. description server5 internal eth4
  15. no cdp enable
  16. switchport access vlan 11
  17. channel-group 15

编辑:在IP更改之前和之后,在同一服务器的nexus1上添加了非VPC端口通道的结果(更改了IP以影响负载平衡算法).这仍然在服务器上使用相同的设置.

  1. port states (down by means of "shutdown")
  2. nexus 1 eth1/7 up up down up
  3. nexus 1 eth1/14 down up up up <= port moved from nexus 2 eth1/7
  4.  
  5. connectivity (sever at 10.0.11.5,hashing uses Eth1/14)
  6. client 1 - server OK OK OK FAIL
  7. client 2 - server OK OK OK FAIL

改变IP后的结果如预测的那样;启动未使用的接口会导致故障.

  1. connectivity (sever at 10.0.11.15,hashing uses Eth1/7)
  2. client 1 - server OK FAIL OK OK
  3. client 2 - server OK FAIL OK OK

解决方法

我设法在Ubuntu中工作的唯一LACP配置是:
  1. auto bond0
  2. iface bond0 inet dhcp
  3. bond-mode 4
  4. bond-slaves none
  5. bond-miimon 100
  6. bond-lacp-rate 1
  7. bond-updelay 200
  8. bond-downdelay 200
  9.  
  10. auto eth0
  11. iface eth0 inet manual
  12. bond-master bond0
  13.  
  14. auto eth1
  15. iface eth1 inet manual
  16. bond-master bond0

即我不使用债券奴隶而是债券主人.我不确定区别是什么,但我发现这个配置对我有用.

我的设置下LACP没有任何问题,尽管这是1Gbe网络.

此外,如果您仍然遇到问题,请尝试将两根电缆插入同一交换机并配置LACP端口.只是为了消除多机箱LACP问题的可能性.

猜你在找的Linux相关文章