首页 > 系统服务 > 详细

linux双网卡绑定

时间:2015-07-10 16:55:28      阅读:262      评论:0      收藏:0      [点我收藏+]

环境:eth0,eth1绑定为bond0,绑定ip为192.168.1.110。


操作:

1:bondind模块配置。

  在/etc/modprobe.conf中添加bond模块内容:

#vi /etc/modprobe.conf
  alias bond0 bonding
  options bond0 miimon=100 mode=0

  mode0表示负载均衡模式,mode1表示主备模式,默认eth0为主工作网卡


2:创建网卡ifcfg-bond0。

#cd /etc/sysconfig/network-scripts/
#vi ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.1.110
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=static
USERCTL=no


3:配置网卡eth0,ech1。

 echo0:

vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=yes
#vi ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=yes

  把两张网卡的MASTER都指向bond0。


4:重启网络,使配置生效。

 #service network restart

本文出自 “linux运维” 博客,请务必保留此出处http://icenycmh.blog.51cto.com/4077647/1672872

linux双网卡绑定

原文:http://icenycmh.blog.51cto.com/4077647/1672872

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!