服务器绑定接口configuration

(在http://unix.stackexchange.com上也提出了同样的问题)

我们正在面对服务器configuration的一些问题:有2个服务器,每个服务器都包含2个绑定的NIC。 每个服务器连接到2个思科交换机(每个网卡连接到单独的交换机)。 交换机上的端口被configuration为具有VLAN 1111.交换机之间也有互连(该VLAN是互连的一部分)。

交换机2上有以下错误(Gi0 / 25是服务器连接的地方,Gi0 / 30是互连)

*Jun 1 16:18:23.182: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/25 and port Gi0/30 *Jun 1 16:18:45.093: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/30 and port Gi0/25 *Jun 1 16:18:56.031: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/25 and port Gi0/30 *Jun 1 16:19:15.141: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/25 and port Gi0/30 *Jun 1 16:19:23.479: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/30 and port Gi0/25 *Jun 1 16:19:45.616: %SW_MATM-4-MACFLAP_NOTIF: Host 1cc1.de7a.04b6 in vlan 1111 is flapping between port Gi0/30 and port Gi0/25 

在检查configuration时,您可以看到两台交换机都已经学习了1cc1.de7a.04b6的MAC地址

 NLS-PDC-SW2>show mac address-table vlan 1111 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1111 1cc1.de7a.046a DYNAMIC Gi0/26 1111 1cc1.de7a.04b6 DYNAMIC Gi0/25 Total Mac Addresses for this criterion: 23 NLS-PDC-SW1>show mac address-table vlan 1111 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1111 1cc1.de7a.04b6 DYNAMIC Gi0/25 Total Mac Addresses for this criterion: 24 NLS-PDC-SW1> 

从两个服务器检查modprobe文件我发现,在server2(其中包含1cc1.de7a.04b6)

 alias bond0 bonding options bond0 miimon=100 

和server1(其中包含1cc1.de7a.046a)

 alias bond0 bonding options bond0 miimon=100 mode=1 

我真的很困惑所需的configuration。 你能build议吗?

编辑

 [admin@servera ~]$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 1c:c1:de:7a:04:6a Slave Interface: eth3 MII Status: up Link Failure Count: 1 Permanent HW addr: 98:4b:e1:0a:cb:20 [admin@serverb ~]$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 1c:c1:de:7a:04:b6 Slave Interface: eth3 MII Status: up Link Failure Count: 1 Permanent HW addr: 98:4b:e1:01:49:ba 

循环(模式0)绑定中的端口需要位于EtherChannel中。

阅读绑定文档,第5章交换机configuration:

https://www.kernel.org/doc/Documentation/networking/bonding.txt

此外,modprobe不是configuration绑定选项的正确位置,您应该在/etc/sysconfig/network-scripts/ifcfg-bondX使用BONDING_OPTS="miimon=100 mode=X"

我认为问题的根源在于您在其中一台服务器上使用循环模式。 尝试将循环(模式= 0)更改为主动备份(模式= 1)