您的位置:首页 > 运维架构 > Linux

linux双网卡绑定

2015-07-10 14:33 429 查看

环境: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

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: