redhat 6.4 雙網卡綁定

 

linux系統配置linux

一、redhat 6.4 雙網卡綁定vim

1)#ethtool eth* //在服務器網口接網線至筆記本,肯定各網口的配置文件;服務器

2)切換目錄網絡

#cd /etc/sysconfig/network-scripts/rest

3)新建文件ifcfg-bond0server

#vim ifcfg-bond0blog

DEVICE=bond0ip

ONBOOT=yesget

BOOTPRORO=staticit

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;

相關文章
相關標籤/搜索