Centos BOND配置

來源:互聯網
上載者:User

標籤:centos bond配置

#Centos bond

- centos 6.5 bond

-eth0

-eth1

# 建立ifcfg-bond0

/etc/sysconfig/network-scripts/ifcfg-bond0

 

DEVICE=bond0

BOOTPROTO=none

ONBOOT=yes

IPADDR=10.58.11.11

NETMASK=255.255.255.0

NETWORK=10.58.11.0

GATEWAY=10.58.11.254

USERCTL=no

NAME=bond0

### 查看ifcfg-eth0

```
# Intel Corporation 82545EM GigabitEthernet Controller (Copper)  #網卡名字可注釋
DEVICE=eth0
BOOTPROTO=static
#HWADDR=00:0C:29:A8:19:CB #MAC地址可以注釋
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
IPV6INIT=no
```

### 查看ifcfg-eth1

```
# Intel Corporation 82545EM GigabitEthernet Controller (Copper)  #網卡名字可注釋
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
#HWADDR=00:0c:29:a8:19:d5  #MAC地址可以注釋
MASTER=bond0
SLAVE=yes
USERCTL=no
IPV6INIT=no
```

 #建立或修改模組檔案

  vim  /etc/modprode.conf

 

#載入bongding 模組,對外虛擬網路介面裝置為bond0,在最後加入以下2行

alias bond0 bongding

options bond0 mode=1 miimon=100

 

 

miimon 是鏈路監測的時間間隔單位是毫秒,miimon=100的意思就是,每100毫秒檢測網卡和交換器之間是否連通,如不通則使用另外的鏈路。
mode=0 表示負載平衡方式,兩塊網卡都工作,需要交換器作支援
mode=1 表示冗餘方式,網卡只有一個工作,一個出問題啟用另外的
mode=6 表示負載平衡方式,兩塊網卡都工作,不需要交換器作支援

 


##添加自啟動

/etc/rc.d/rc.local

ifenslave   bond0 eth0 eth1

 

##檢測

###重啟網路服務

 

/etc/init.d/network restart

 

## 查看bond0 狀態

more  /proc/net/bonding/bond0

 

###查看網口

ifconfig  -a

 

 

 

 

 

 

 

本文出自 “崔瑞洲” 部落格,請務必保留此出處http://cuiruizhouok.blog.51cto.com/2909906/1694530

Centos BOND配置

相關文章

聯繫我們

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