welcome

linux双网卡绑定

1.用ip a的命令确定哪两个up的端口作为绑定的端口

实际现场可以用ethtool -p来确定电口

 

2.创建bond0

cd /etc/sysconfig/network-script/

touch ifcfg-bond0

在bond0上添加ip,掩码,另外设置ONBOOT=yes及BOOTPROTO=none或static

设置BOODING_OPTS

 

3.将需要的网卡绑定

添加MASTER=bond0及SLAVE=yes

 

 

4.重启网络

出现:
cat /proc/net/bonding/bond0
排查是eth1的问题,无法绑定,强行ifup开启eth1端口
出现master connection not found or invalid:
解决办法是关闭NetworkManager
#NetworkManager影响到了双网卡绑定
 service NetworkManager stop
 chkconfig NetworkManager off

posted on 2018-11-28 00:06  vanspumakappa  阅读(134)  评论(0编辑  收藏  举报

导航