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
注:完成以上步骤一定要重启计算机,由于bonding需要加载驱动,本环境在CentOS4.5测试通过. (来源:黑虫Linux空间)
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20