Linux双网卡绑定一个IP步骤
1.新建/etc/sysconfig/network-scripts/ifcfg-bond0文件
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.128.225
NETMASK=255.255.255.224
GATEWAY=192.168.128.233
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.conf文件,加入以下内容
alias bond0 bonding
options bond0 miimon=100 mode=0
5.加入/etc/rc.d/rc.local启动项
ifenslave bond0 eth0 eth1
6.启动网卡
ifconfig bond0 192.168.128.225 up
ifenslave bond0 eth0 eth1
阅读(389) | 评论(0) | 转发(0) |