歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RHEL6 雙網卡bonding配置

RHEL6 雙網卡bonding配置

日期:2017/2/28 15:47:01   编辑:Linux教程

RHEL6 雙網卡bonding配置

1)RHEL6下不再有modprobe.conf這個文件
在/etc/modprobe.d/裡建立bond0

[root@server modprobe.d]# cat /etc/modprobe.d/bond0
alias bond0 bonding
options bond0 miimon=100 mode=4

2)交換機上接口打上LACP模式

3)配置網卡/etc/sysconfig/network-scripts/ifcfg-ethX
我配置的模式是:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
#HWADDR=84:2b:2b:59:43:ae
#NM_CONTROLLED=yes
#IPADDR=192.168.3.243
#NETMASK=255.255.255.0
#TYPE=Ethernet
#IPV6INIT=no

4)配置bond0網卡
[root@server ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
GATEWAY=192.168.3.254
IPADDR=192.168.3.247
#BROADCAST=192.168.3.255
#NETWORK=192.168.3.0

5)重啟系統之後才能生效

6)排錯
RHEL6啟動很快,進入系統的時候,網卡還沒有起來,交換機上的燈還是黃色的。稍等一會,交換機的燈變成綠色,說明正常。但是此刻,在系統裡仍然不能ping通其他機器。
/etc/init.d/network restart之後提示bond0 connection ativation failed:device not managed by networkmanager,交換機上網卡燈變黃

解決方法是chkconfig NetworkManager off;/etc/init.d/NetworkManager stop;chkconfig network on;/etc/init.d/network restart
系統提示bond0 ok,稍等一會,交換機上網卡燈由黃色變綠色,此時機器正常,可以ping通其他機器

Copyright © Linux教程網 All Rights Reserved