centos多網卡綁定

來源:互聯網
上載者:User

RHEL6與以前的Redhat Linux版本在網路設定方面略有不同,本文詳述RHEL6下多網卡綁定的配置操作過程。

1. 建立綁定介面bond0

[root@Hostname ~]#touch /etc/sysconfig/network-scripts/ifcfg-bond0[root@Hostname ~]#cat /etc/sysconfig/network-scripts/ifcfg-bond0DEVICE=bond0ONBOOT=yesIPADDR=172.24.254.13BOOTPROTO=noneNETMASK=255.255.255.0TYPE=EthernetGATEWAY=172.24.254.91BONDING_OPTS="MODE=0 MIIMON=1000"

2. 配置物理介面eth2,eth3,eth4,eth5

[root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2DEVICE=eth2ONBOOT=yesBOOTPROTO=noneTYPE=Ethernet[root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3DEVICE=eth3ONBOOT=yesBOOTPROTO=noneTYPE=Ethernet[root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth4DEVICE=eth4ONBOOT=yesBOOTPROTO=noneTYPE=Ethernet[root@Hostname ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth5DEVICE=eth5ONBOOT=yesBOOTPROTO=noneTYPE=Ethernet

3.配置Bonding設定檔/etc/modprobe.d/bond0.conf

[root@Hostname ~]# cat /etc/modprobe.d/bond0.confalias bond0 bonding

4.修改系統設定檔/etc/rc.local,在檔案末尾增加如下內容

ifenslave bond0 eth2 eth3 eth4 eth5

5.重啟系統,讓配置生效


更多資訊請參考:
http://www.linuxtopia.org/online_books/rhel6/rhel_6_deployment/rhel_6_deployment_sec-Using_Channel_Bonding.html

另外:如果在RHEL6下執行:
service network restart

時,報如下錯誤:
Bringing up interface bond0: Error: Connection activation failed: Device not managed by NetworkManager

此錯誤是因為系統中預設由NetworkManager服務管理網路,可以將其停止:

[root@Hostname ~]#chkconfig NetworkManager off[root@Hostname ~]#service NetworkManager stop[root@Hostname ~]#chkconfig network on[root@Hostname ~]#service network restart

注意NetworkManager區分大小寫。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.