Centos上的雙網卡綁定

來源:互聯網
上載者:User

標籤:centos雙網卡綁定

1.登入系統切換目錄:

# cd /etc/sysconfig/network-scripts/

2.添加綁定網卡bond#的配置

# vim ifcfg-bond0

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=static

IPADDR=59.151.2.134

NETMASK=255.255.255.240

GATEWAY=59.151.2.129

# vim ifcfg-bond1

DEVICE=bond1

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=static

IPADDR=172.16.10.134

NETMASK=255.255.255.0

3.修改原來的網卡設定檔內容為:

# cat ifcfg-em*

DEVICE=em1

ONBOOT=yes

BOOTPROTO=none

 

DEVICE=em2

ONBOOT=yes

BOOTPROTO=none

 

DEVICE=em3

ONBOOT=yes

BOOTPROTO=none

 

DEVICE=em4

ONBOOT=yes

BOOTPROTO=none

4.在dist.conf檔案中添加

# vim/etc/modprobe.d/dist.conf

alias bond0bonding

options bond0miimon=100 mode=6

 

alias bond1bonding

options bond1miimon=100 mode=6

 

alias net-pf-10off

alias ipv6 off

 

5.在/etc/rc.local中添加

ifenslave bond0em1 em2

ifenslave bond1em3 em4


本文出自 “wqh” 部落格,請務必保留此出處http://wangqh.blog.51cto.com/5367393/1758788

Centos上的雙網卡綁定

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.