双网卡绑定一个IP--bond


双网卡绑定一个IP

步骤1:新建/etc/sysconfig/network-scripts/ifcfg-bond0文件

DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
USERCTL=no

步骤2:更改/etc/sysconfig/network-scripts/ifcfg-eth0网卡

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
USERCTL=no

步骤3:更改/etc/sysconfig/network-scripts/ifcfg-eth1网卡

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
USERCTL=no

步骤4:编辑 /etc/modprobe.d/dist.conf最后一行添加)

alias bond0 bonding
options bond0 miimon=100 mode=0

步骤5:加入/etc/rc.d/rc.local启动项

  ifenslave bond0 eth0 eth1   

步骤6:重启下机器

        reboot

步骤7:测试

       网线从eth0拔下插到eth1还能正常ping通测配置成功


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM