标签:
双网卡绑定
在/etc/modprobe.d/下建立bond0.conf
#vi /etc/modprobe.d/bond0.conf
输入下面内容
alias bond0 bonding
options bond0 miimon=100 mode=1
建立channel bonding interface
#vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
IPADDR=172.16.251.171
NETMASK=255.255.255.128
GATEWAY=172.16.251.1
DNS1=172.16.251.200
ONBOOT=yes
USERCTL=no
ARPCHECK=no
修改网卡eth0配置
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
输入下面内容
DEVICE="eth0"
BOOTPROTO=none
#ONBOOT="no"
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
修改网卡eth1配置
#vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO=none
#ONBOOT="no"
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
添加bond0模块
modprobe bonding
#ifconfig bond0 down
配置miimon
#echo 100 > /sys/class/net/bond0/bonding/miimon
配置mode
#echo 1 > /sys/class/net/bond0/bonding/mode
#ifconfig bond0 up
#vi /etc/rc.d/rc.local
加入下列:
modprobe bonding miimon=100 mode=1 primary=eth0
ifenslave bond0 eth0 eth1
#chkconfig NetworkManager off
#service NetworkManager stop
#chkconfig network
#service network restart
#/etc/rc.d/init.d/network restart
标签:
原文地址:http://www.cnblogs.com/immortality/p/5619096.html