AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 516101
Accepted
Wesley
Wesley
Asked: 2013-06-16 15:08:32 +0800 CST2013-06-16 15:08:32 +0800 CST 2013-06-16 15:08:32 +0800 CST

RHEL 6.4:模式 1 通道绑定未故障转移

  • 772

我在带有两个板载 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-etho 和 ifcfg-eth1

首先,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

接下来,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

ifcfg-bond0

我的债券的配置文件:

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"

/etc/modprobe.d/bonding.conf

我有一个/etc/modprobe.d/bonding.conf这样填充的文件:

alias bond0 bonding

ip地址输出

bond 已经启动,我可以通过 bond 的 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

绑定内核模块

...已加载:

# cat /proc/modules | grep bond
bonding 111135 0 - Live 0xf9cdc000

/系统/类/净

文件系统显示/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

/var/日志/消息

日志文件中没有任何值得关注的内容。事实上,一切看起来都很幸福。

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

所以有什么问题?!

从 eth0 拔掉网线会导致所有通信中断。可能是什么问题,我应该采取哪些进一步的步骤来解决这个问题?

编辑:

进一步的故障排除:

该网络是由 ProCurve 1800-8G 交换机提供的单个子网、单个 VLAN。我已添加并primary=eth0重新ifcfg-bond0启动网络服务,但这并没有改变任何行为。我/sys/class/net/bond0/bonding/primary在添加之前和之后都进行了检查primary=eth1,它有一个空值,我不确定这是好是坏。

Tailing /var/log/messageswhen eth1has its cable removed shows nothing more:

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

我添加use_carrier=0到ifcfg-bond0的BONDING_OPTS部分以启用 MII/ETHTOOL ioctl 的使用。重新启动网络服务后,症状没有任何变化。拔下电缆eth0会导致所有网络通信停止。再一次,/var/log/messages保存该端口上的链接断开的通知没有错误。

linux
  • 3 3 个回答
  • 15186 Views

3 个回答

  • Voted
  1. Best Answer
    Wesley
    2013-06-16T16:13:59+08:002013-06-16T16:13:59+08:00

    读。您的。配置。

    当失败时...

    读。全部。输出。

    你看到里面是什么了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  ]
    

    仔细注意您键入的所有内容,当您犯下不可避免的键入错误时,请仔细注意您看到的每个输出。

    你是一个坏人,你应该感到难过。

    • 21
  2. dmourati
    2013-06-16T15:19:36+08:002013-06-16T15:19:36+08:00

    尝试将其中一个 NICS 指定为主从。

    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 primary=eth0"
    

    来自RH的更多文档:

    primary= 指定主设备的接口名称,例如 eth0。主设备是要使用的第一个绑定接口,除非发生故障,否则不会被放弃。当绑定接口中的一个 NIC 速度更快并因此能够处理更大的负载时,此设置特别有用。此设置仅在绑定接口处于主备模式时有效。有关详细信息,请参阅 /usr/share/doc/kernel-doc-/Documentation/networking/bonding.txt。

    • 2
  3. mcw
    2013-12-06T13:36:55+08:002013-12-06T13:36:55+08:00

    在检测到失败后在失败的 milisec 中添加以下绑定选项 downdelay=xxxx,并将主要从属设置为其余。如果此参数不在 bonding_opt 中,则绑定会检测到故障(因为您包括 miimom=yyyy)但它永远不会使 eth0 失败。您可以通过查看 /proc/net/bonding/bondX 文件来了解这种情况。

    无论如何,对于 RHEL 6.3(几乎与您的版本相同),我们遇到了与故障回复相关的其他几个绑定问题,从交换机看到重复的 mac 地址。

    祝你好运。

    • 2

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve