双网卡绑定一个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通测配置成功
Keep empowering yourself successfully...