1)检查是否存在NetworkManager服务,如果存在就卸载

   rpm –aq|grep NetworkManager

   rpm –e NetworkManager –nodeps

2)查找插线的网卡

ethtool eth0|grep Speed    Speed: 1000Mb/s(插线)

ethtool eth1|grep Speed    Speed: Unknown!(未插线)

3)编辑网卡配置

eth0配置:

DEVICE=eth0

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

eht2配置:

DEVICE=eth2

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

bond0配置:

DEVICE=bond0

ONBOOT=yes

BOOTPROTO=none

IPADDR=10.202.48.41

NETMASK=255.255.255.0

GATEWAY=10.202.48.1

bond0.301配置:

DEVICE=bond0.301

BOOTPROTO=static

BROADCAST=10.202.16.255

IPADDR=10.202.16.11

NETMASK=255.255.255.0

GATEWAY=10.202.16.1

NETWORK=10.202.16.0

ONBOOT=yes

VLAN=yes

4)注意事项

需要与网络管理员进行沟通,在交换机是否标记vlan标签

如果有vlan标签,需要配置bond0.301配置

如果没有vlan标签,只配置到bond0即可

5)配置网卡模块服务

编辑/etc/modprobe.d/bonding.conf文件,添加

alias bond0 bonding

options bond0 mode=1miimon=100

编辑/etc/rc.sysinit文件,添加

modprobe 8021q

6)启动网络服务

modprobe bonding

modprobe 8021q

之后使用service network restart重启网络服务