您的位置:首页 > 运维架构 > Linux

linux bond 配置步骤

2015-04-27 10:22 239 查看

一、网卡绑定:

1:创建一个ifcfg-bond0

#cd /etc/sysconfig/network-scripts/
#vi ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.5.20.13
NETMASK=255.255.252.0
GATEWAY=10.5.20.253
BONDING_OPTS="mode=0 miimon=100" ##mode有多种模式实现不同的功能

2:修改/etc/sysconfig/network-scripts/ifcfg-eth*

#vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

#vi ifcfg-eth1DEVICE=eth1ONBOOT=yesBOOTPROTO=noneMASTER=bond0SLAVE=yes

3:配置/etc/modules.conf,添加alias bond0 bonding

此配置可能没有,需要创建
#vi /etc/modules.conf
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
alias bond0 bonding

4:重启服务

#service network restart

可以通过查看/proc/net/bonding/bond0,查看当前是用的bond是什么模式
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux 网卡 bond