Wes*_*ley 11 linux redhat bonding rhel6
我在带有两个板载 Broadcom NetXtreme II BCM5708 1000Base-T NIC 的 HP ML 350 G5 上运行 RHEL 6.4、kernel-2.6.32-358.el6.i686。我的目标是将两个接口连接成一个mode=1
故障转移对。
我的问题是,尽管有所有证据表明绑定已建立并被接受,但将电缆从主 NIC 中拔出会导致所有通信停止。
首先,ifcfg-eth0:
DEVICE=eth0
HWADDR=00:22:64:F8:EF:60
TYPE=Ethernet
UUID=99ea681d-831b-42a7-81be-02f71d1f7aa0
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
Run Code Online (Sandbox Code Playgroud)
接下来,ifcfg-eth1:
DEVICE=eth1
HWADDR=00:22:64:F8:EF:62
TYPE=Ethernet
UUID=92d46872-eb4a-4eef-bea5-825e914a5ad6
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
Run Code Online (Sandbox Code Playgroud)
我的债券的配置文件:
DEVICE=bond0
IPADDR=192.168.11.222
GATEWAY=192.168.11.1
NETMASK=255.255.255.0
DNS1=192.168.11.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS="mode=1 miimmon=100"
Run Code Online (Sandbox Code Playgroud)
我有一个/etc/modprobe.d/bonding.conf
这样填充的文件:
alias bond0 bonding
Run Code Online (Sandbox Code Playgroud)
绑定完成,我可以通过绑定的IP地址访问服务器的公共服务:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 00:22:64:f8:ef:60 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
link/ether 00:22:64:f8:ef:60 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:22:64:f8:ef:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.222/24 brd 192.168.11.255 scope global bond0
inet6 fe80::222:64ff:fef8:ef60/64 scope link
valid_lft forever preferred_lft forever
Run Code Online (Sandbox Code Playgroud)
...加载:
# cat /proc/modules | grep bond
bonding 111135 0 - Live 0xf9cdc000
Run Code Online (Sandbox Code Playgroud)
该/sys/class/net
文件系统表现出良好的东西:
cat /sys/class/net/bonding_masters
bond0
cat /sys/class/net/bond0/operstate
up
cat /sys/class/net/bond0/slave_eth0/operstate
up
cat /sys/class/net/bond0/slave_eth1/operstate
up
cat /sys/class/net/bond0/type
1
Run Code Online (Sandbox Code Playgroud)
日志文件中没有出现任何值得关注的内容。事实上,一切看起来都很幸福。
Jun 15 15:47:28 rhsandbox2 kernel: Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: setting mode to active-backup (1).
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: setting mode to active-backup (1).
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: setting mode to active-backup (1).
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: setting mode to active-backup (1).
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: Adding slave eth0.
Jun 15 15:47:28 rhsandbox2 kernel: bnx2 0000:03:00.0: eth0: using MSI
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: making interface eth0 the new active one.
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: first active interface up!
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: enslaving eth0 as an active interface with an up link.
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: Adding slave eth1.
Jun 15 15:47:28 rhsandbox2 kernel: bnx2 0000:05:00.0: eth1: using MSI
Jun 15 15:47:28 rhsandbox2 kernel: bonding: bond0: enslaving eth1 as a backup interface with an up link.
Jun 15 15:47:28 rhsandbox2 kernel: 8021q: adding VLAN 0 to HW filter on device bond0
Jun 15 15:47:28 rhsandbox2 kernel: bnx2 0000:03:00.0: eth0: NIC Copper Link is Up, 1000 Mbps full duplex
Jun 15 15:47:28 rhsandbox2 kernel: bnx2 0000:05:00.0: eth1: NIC Copper Link is Up, 1000 Mbps full duplex
Run Code Online (Sandbox Code Playgroud)
从 eth0 拔下网线会导致所有通信中断。问题可能是什么,我应该采取哪些进一步的步骤来解决这个问题?
该网络是由 ProCurve 1800-8G 交换机提供的单个子网、单个 VLAN。我已经加入primary=eth0
到ifcfg-bond0
并重新启动网络服务,但是这并没有改变任何行为。我/sys/class/net/bond0/bonding/primary
在添加之前和之后都检查过,primary=eth1
它有一个空值,我不确定这是好还是坏。
移除电缆/var/log/messages
时的拖尾eth1
显示无非是:
Jun 15 16:51:16 rhsandbox2 kernel: bnx2 0000:03:00.0: eth0: NIC Copper Link is Down
Jun 15 16:51:24 rhsandbox2 kernel: bnx2 0000:03:00.0: eth0: NIC Copper Link is Up, 1000 Mbps full duplex
Run Code Online (Sandbox Code Playgroud)
我添加了use_carrier=0
toifcfg-bond0
的BONDING_OPTS
部分以启用 MII/ETHTOOL ioctls 的使用。重新启动网络服务后,症状没有变化。拔出电缆eth0
会导致所有网络通信停止。再一次,/var/log/messages
保存该端口上的链接断开的通知没有错误。
Wes*_*ley 21
当那失败时......
你看到里面有什么了ifcfg-bond0
吗?不,你明白里面是什么ifcfg-bond0
吗?
滑企鹅的世界是miimmon=100
什么?
哦,对不起,你的意思是miimon=100
?
是的,我想你的意思是miimon
而不是miimmon
。
此外,一个很大的好处是,当您重新启动网络服务时,您会看到:
service network restart
Shutting down interface bond0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: ./network-functions: line 446: /sys/class/net/bond0/bonding/miimmon: No such file or directory
./network-functions: line 446: /sys/class/net/bond0/bonding/miimmon: No such file or directory
[ OK ]
Run Code Online (Sandbox Code Playgroud)
仔细注意您输入的所有内容,当您犯下不可避免的输入错误时,请仔细注意您看到的每个输出。
你是一个坏人,你应该感觉不好。
归档时间: |
|
查看次数: |
15025 次 |
最近记录: |