centos6.x 配置bond


centos6.x 配置bond

摘要: centos6.x下使用雙網卡配置bond0, centos6 bond配置不需要在/etc/modprobe 中定義bond 直接在網卡中定義BONDING_OPTS 即可,例如bond0: BONDING_OPTS="mode=0 miimon=100"

物理網卡eth0 eth1綁定為bond0

1 物理網卡配置

ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

  

ifcfg-eth1

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

  

2 bond0網卡配置

ifcfg-bond0

DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=xx.xx.xx.xx
NETMASK=xx.xx.xx.xx
GATEWAY=xx.xx.xx.xx
DNS1=xx.xx.xx.xx
BONDING_OPTS="mode=0 miimon=100"

  

重啟網卡

service network restart

  

3 查看bond0網卡狀態

[root@localhost network-scripts]# cat /proc/net/bonding/bond0
EthernetChannelBondingDriver: v3.7.1(April27,2011)
BondingMode: load balancing (round-robin)
MII Status: up
MII PollingInterval(ms):100
UpDelay(ms):0
DownDelay(ms):0
SlaveInterface: eth1
MII Status: up
Speed:1000Mbps
Duplex: full
LinkFailureCount:0
Permanent HW addr:00:0c:29:a1:34:eb
Slave queue ID:0
SlaveInterface: eth2
MII Status: up
Speed:1000Mbps
Duplex: full
LinkFailureCount:0
Permanent HW addr:00:0c:29:a1:34:e1
Slave queue ID:0

 

Tips: 日志可以使用tailf /var/log/messages實時查看


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM