分类: LINUX
2008-03-05 15:36:09
基于linux的网卡绑定(bonding)
/etc/sysconfig/network-scripts下的文件:
1.ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.63
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
TYPE=Ethernet
2.ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
3.ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
4./etc/modprobe.conf:
alias bond0 bonding
options bond0 miimon=100 mode=1
二、另外一种设置方式:
/etc/sysconfig/network-scripts下的文件:
1.ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.63
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
TYPE=Ethernet
2.ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
3.ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
4./etc/rc.d/rc.local中添加如下一行:
ifenslave bond0 eth0 eth1
5./etc/modprobe.conf:
alias bond0 bonding
options bond0 miimon=100 mode=1