RHEL6与以前的Redhat Linux版本在网络配置方面略有不同,本文详述RHEL6下多网卡绑定的配置操作过程。
1. 创建绑定接口bond0
- [root@Hostname ~]#touch /etc/sysconfig/network-scripts/ifcfg-bond0
- [root@Hostname ~]#cat /etc/sysconfig/network-scripts/ifcfg-bond0
- DEVICE=bond0
- ONBOOT=yes
- IPADDR=172.24.254.13
- BOOTPROTO=none
- NETMASK=255.255.255.0
- TYPE=Ethernet
- GATEWAY=172.24.254.91
- BONDING_OPTS="MODE=0 MIIMON=1000"
- 2. 配置物理接口eth2,eth3,eth4,eth5
- [root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2
- DEVICE=eth2
- ONBOOT=yes
- BOOTPROTO=none
- TYPE=Ethernet
- [root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
- DEVICE=eth3
- ONBOOT=yes
- BOOTPROTO=none
- TYPE=Ethernet
- [root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth4
- DEVICE=eth4
- ONBOOT=yes
- BOOTPROTO=none
- TYPE=Ethernet
- [root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth5
- DEVICE=eth5
- ONBOOT=yes
- BOOTPROTO=none
- TYPE=Ethernet
- 3.配置Bonding配置文件/etc/modprobe.d/bond0.conf
- [root@Hostname ~]# cat /etc/modprobe.d/bond0.conf
- alias bond0 bonding
- 4.修改系统配置文件/etc/rc.local,在文件末尾增加如下内容
- ifenslave bond0 eth2 eth3 eth4 eth5
- 5.重启系统,让配置生效
- [root@Hostname ~]# reboot
- 更多信息请参考:
另外:如果在RHEL6下执行:
时,报如下错误:
- Bringing up interface bond0: Error: Connection activation failed: Device not managed by NetworkManager
此错误是因为系统中默认由NetworkManager服务管理网络,可以将其停止:
- [root@Hostname ~]#chkconfig NetworkManager off
- [root@Hostname ~]#service NetworkManager stop
- [root@Hostname ~]#chkconfig network on
- [root@Hostname ~]#service network restart
注意NetworkManager区分大小写。
阅读(8874) | 评论(0) | 转发(1) |