美文网首页
IT: Redhat 6 Ethernet Bonding 网卡

IT: Redhat 6 Ethernet Bonding 网卡

作者: cvgti | 来源:发表于2016-04-12 23:39 被阅读0次

    今天工作中配置了一下Redhat 6 系统下的网卡绑定:
    主要是参照了如下两个地方的说明:

    1. Redhat 官方网站
    2. http://linuxnote.blog.51cto.com/9876511/1680315

    我的两个问题是:

    1. 我在redhat 6 上怎么配置这个网卡绑定,并且重启后还能正常工作。
    2. 交换机上配置正常否?

    这两个问题都得到了解答,最后配置了一个四个网卡的bonding, 用的是默认的mode, 也就是mode 0, Round Robin.
    这种模式还需要在交换机里配置一下。

    大体步骤如下:

    卸载 NetworkManager, 这个一直没啥用。
    modprobe --first-time bonding

    在/etc/sysconfig/network-script/下创建ifcfg-bond0 文件,文件配置如下:

    DEVICE=bond0
    IPADDR=192.168.1.1
    NETMASK=255.255.255.0
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    NM_CONTROLLED=no
    BONDING_OPTS="bonding parameters separated by spaces"

    在/etc/sysconfig/network-script/ 下其余的 ifcfg-ethX 配置如下:

    DEVICE=ethX
    BOOTPROTO=none
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    NM_CONTROLLED=no

    最后需要把这些加入

    echo 'alias bond0 bonding' >> /etc/modprobe.d/bonding.conf
    echo 'options bonding mode=0 miimon=100' >> /etc/modprobe.d/bonding.conf
    echo 'ifenslave bond0 eth0 eth1' >>/etc/rc.local

    否则重启后 bond0 无法启动

    最后一步:

    service network restart

    相关文章

      网友评论

          本文标题:IT: Redhat 6 Ethernet Bonding 网卡

          本文链接:https://www.haomeiwen.com/subject/srewlttx.html