@cdmonkey
2016-12-20T10:12:40.000000Z
字数 1294
阅读 1488
操作系统
http://www.cnblogs.com/dkblog/p/3613407.html
网卡绑定的“mode”共有七种:bond0、bond1、bond2、bond3、bond4、bond5、bond6
常用的有三种:
MAC
地址的。
[root@PBSPTS01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.120.5
NETMASK=255.255.255.0
GATEWAY=192.168.120.1
DEVICE=eth0
BOOTPROTO=static
HWADDR=B4:99:BA:B5:19:FC
ONBOOT=yes
MASTER=bond0
SLAVE=yes
DEVICE=eth1
BOOTPROTO=static
HWADDR=B4:99:BA:B5:19:FE
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@PBSPTS01 ~]# vim /etc/modprobe.d/bonding.conf
# Bonding the eth0 & eth1
alias bond0 bonding
options bond0 miimon=100 mode=1
完成上面的操作后还需要确认相关的模块是否被加载:
[root@PBSPTS01 ~]# lsmod | grep bonding
bonding 131724 0
检查一下绑定后的网卡:
[root@PBSPTS01 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 14:18:77:49:c0:8b
Slave queue ID: 0
Slave Interface: em2
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 14:18:77:49:c0:8c
Slave queue ID: 0