当前位置: 代码迷 >> 综合 >> RedHat6中bond绑定双网卡
  详细解决方案

RedHat6中bond绑定双网卡

热度:80   发布时间:2024-03-10 02:11:37.0
  • 关闭NetworkManager服务

    service NetworkManager stop

    chkconfig NetworkManager off

  • 修改bond0的配置文件

    vi  /etc/sysconfig/network-scripts/ifcfg-bong0

  • 修改对应网卡的配置文件

    vi  /etc/sysconfig/network-scripts/ifcfg-eth4

    vi  /etc/sysconfig/network-scripts/ifcfg-eth6

  • 修改模块加载配置文件,开机自动加载bonding模块到Kernel中

    vi /etc/modprobe.d/dist.conf 追加如下内容

    alias bond0 bonding

    options bond0 mode=0 miimon=100

    常用的模式有主备和轮询,mode=0是轮询round-robin ,mode=1是主备active-backup

  • 添加开机自启动

    vi /etc/rc.d/rc.local

    在最后一行添加:

    ifenslave bond0 eth4 eth6

  • 重启验证 验证网卡和id号

    cat /proc/net/bonding/bond0