[基础]RHEL6双网卡绑定BOND

B o n d i n g  I n t e r f a c e s


/etc/sysconfig/network-scripts/
ifcfg-bond0 interface configuration file

DEVICE=bond0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NM_CONTROLLED=no
BONDING_OPTS="miimon=X  mode=X"
#bonding parameters separated by spaces"

说明:
miimon=100
miimon是指多久时间要检查网路一次,单位是ms(毫秒)
这边的100,是100ms,即是0.1秒
意思是假设其中有一条网路断线,会在0.1秒内自动备援
mode共有七种(0~6)
mode=0:平衡负载模式,有自动备援,但需要”Switch”支援及设定。
mode=1:自动备援模式,其中一条线若断线,其他线路将会自动备援。
mode=4:LACP is referred to in linux as bonding mode 4 => 所以也能用BOND做LACP
mode=6:平衡负载模式,有自动备援,不必”Switch”支援及设定。
For example, if two Ethernet interfaces are being channel bonded, both eth0 and eth1 may look like the following example:

DEVICE=ethN
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no   
NM_CONTROLLED=no

建议不指定MAC地址,可以#注释。
To ensure that the module is loaded when the channel bonding interface is brought up, create a new file as root named bonding.conf in the /etc/modprobe.d/ directory

alias bond N bonding


备注:
 
不添加NM_CONTROLLED = no,会被NetManager监控,导致两个端口FAILD,bond提示“bond0 connection ativation failed:device not managed by networkmanager”
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值