环境:

bond_ip=172.18.11.39

GATEWAY=172.18.11.33

-----------------------------------------------------------------------------------------


bond配置

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE="bond0"

NM_CONTROLLED="no"

ONBOOT=yes

BOOTPROTO=static

TYPE=Ethernet

USERCTL=no

IPADDR=172.18.11.39

NETMASK=255.255.255.224

GATEWAY=172.18.11.33

BONDING_OPTS="mode=1 miimon=50"


-----------------------------------------------------------------------------------------


网卡一配置:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-em1

DEVICE="em1"

NM_CONTROLLED="no"

ONBOOT=yes

TYPE=Ethernet

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no


-----------------------------------------------------------------------------------------


网卡二配置:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-em3

DEVICE="em3"

NM_CONTROLLED="no"

ONBOOT=yes

TYPE=Ethernet

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no


-----------------------------------------------------------------------------------------


从启动项中关闭network manager服务

[root@localhost ~]# chkconfig --list | grep Network

NetworkManager  0:关闭  1:关闭  2:关闭  3:关闭  4:关闭  5:关闭  6:关闭


-----------------------------------------------------------------------------------------


如果开启关闭NetworkManager服务

关闭network manager服务

[root@localhost ~]# /etc/init.d/NetworkManager stop


-----------------------------------------------------------------------------------------


重启network

[root@localhost ~]# /etc/init.d/network restart


-----------------------------------------------------------------------------------------


查看网络配置

[root@localhost ~]# ifconfig