首页 > 其他 > 详细

redhat 6.4 双网卡绑定

时间:2015-12-03 00:35:03      阅读:433      评论:0      收藏:0      [点我收藏+]

 

linux系统配置

1、redhat 6.4 双网卡绑定

1)#ethtool eth* //在服务器网口接网线至笔记本,确定各网口的配置文件;

2)切换目录

#cd /etc/sysconfig/network-scripts/

3)新建文件ifcfg-bond0

#vim ifcfg-bond0

DEVICE=bond0

ONBOOT=yes

BOOTPRORO=static

TYPE=Ethernet

USERCTL=no

IPADDR=10.150.27.144

NETMASK=255.255.255.128

GATEWAY=10.150.27.254

4)修改eth0文件

#vim ifcfg-eth0

DEVICE=eth0

ONBOO=yes

BOOTPROTO=none

TYPE=Ethernet

MASTER=bond0

SLAVE=yes

USERCTL=no

5)修改eth1

#vim ifcfg-eth1

DEVICE=eth1

ONBOO=yes

BOOTPROTO=none

TYPE=Ethernet

MASTER=bond0

SLAVE=yes

USERCTL=no

6)加载bonding模块

#vi /etc/modprobe.d/dist.conf //文件的末尾加入

Alias bond0 bonding

Options bond0 mode=1 miimon=100

7)将bond0设置为开机自动加载

#vi /etc/rc.d/rc.local

ifenslave bond0 eth0 eth1

8)重启网卡

#service network restart

9)验证网卡绑定是否成功

#ifconfig //查看bond0,eth0,eth1 三块网卡MAC地址是否一致; 技术分享

# vim /proc/net/bonding/bond0 //也可以确定网卡是否绑定成功

技术分享

10)总结

如果需要绑定多个业务网络或生产网络等,需要在dist.conf配置文件中增加虚拟网卡参数;

Redhat 5版本与Redhat 6版本 写入加载bonding模块的配置文件不一样,redhat 5的配置文件是 modprobe.conf, redhat 6配置文件是 dist.conf;

部分pcserver 存在网卡无法自动开机启动问题,可在rc.local中增加参数 ifconfig eth* up;

redhat 6.4 双网卡绑定

原文:http://www.cnblogs.com/kangfeng/p/5014545.html

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