redhat 6.4 双网卡绑定

 

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地址是否一致; clip_image002

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

clip_image004

10)总结

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

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

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

posted on 2015-12-02 22:30  美丽de世界  阅读(830)  评论(0编辑  收藏  举报