感谢支持
我们一直在努力

RHEL6 双网卡bonding配置

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通其他机器

赞(0) 打赏
转载请注明出处:服务器评测 » RHEL6 双网卡bonding配置
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏