linux网卡 bonding active-backup 模式不能生效

miludeyingxiong 2016-08-18 02:23:00
相关配置:
//
[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不通了。请问,这是为什么呢?



...全文
825 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
miludeyingxiong 2016-08-25
  • 打赏
  • 举报
回复
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 设置
miludeyingxiong 2016-08-19
  • 打赏
  • 举报
回复
Currently Active Slave: eno33561344 已经进行了切换,但是用ifconfig查看bond0 的MAC地址的时候, 仍然是上切换前的地址。
miludeyingxiong 2016-08-18
  • 打赏
  • 举报
回复
当donw掉一个网卡的时候, cat /proc/net/bonding/bond0 可用看到当前active的网卡已经切换了,为什么就是ping不通

4,356

社区成员

发帖
与我相关
我的任务
社区描述
通信技术相关讨论
社区管理员
  • 网络通信
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧