天天看點

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位址可以注釋

MASTER=bond0

SLAVE=yes

IPV6INIT=no

### 檢視ifcfg-eth1

DEVICE=eth1

#HWADDR=00:0c:29:a8:19:d5  #MAC位址可以注釋

 #建立或修改子產品檔案

  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

上一篇: BOND linux
下一篇: 網卡bond實戰