相關配置:
//
[root@sr-iov-1 network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=12.12.12.11
#NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
[root@sr-iov-1 network-scripts]#
[root@sr-iov-1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eno16777984
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eno16777984
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:c9
Slave queue ID: 0
Slave Interface: eno33561344
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:ca
Slave queue ID: 0
[root@sr-iov-1 ~]#
此時,可以在其他機器上ping 通 bond0 12.12.12.11, 此時網卡 eno16777984 為活躍網卡。
將eno16777984 用命令 ifconfig eno16777984 down 之后。bond0的資訊如下:
[root@sr-iov-1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eno33561344
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eno16777984
MII Status: down
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:0c:29:4e:bf:c9
Slave queue ID: 0
Slave Interface: eno33561344
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:ca
Slave queue ID: 0
[root@sr-iov-1 ~]#
上線說明,已經將活躍網卡切換為了 eno33561344。
但是此時, ping 12.12.12.11再也ping不通了。請問,這是為什么呢?
uj5u.com熱心網友回復:
當donw掉一個網卡的時候, cat /proc/net/bonding/bond0 可用看到當前active的網卡已經切換了,為什么就是ping不通uj5u.com熱心網友回復:
Currently Active Slave: eno33561344 已經進行了切換,但是用ifconfig查看bond0 的MAC地址的時候, 仍然是上切換前的地址。uj5u.com熱心網友回復:
set fail_over_mac to instruct the bond to assign the MAC address of the active interface to the bond (this is required if you are testing with VMWare server, and is not rquired if you are using physical NICs),正解: 必須將bonging的驅動 fail_over_mac to = 1 設定
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/128954.html
標籤:網絡通信
