RHEL5.9 bond配置

來源:互聯網
上載者:User

標籤:bond   rhel5   

一、配置bond

1、ifcfg-bond0

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=bond0

BOOTPROTO=static

ONBOOT=yes

IPADDR=10.0.26.27

NETMASK=255.255.255.0

GATEWAY=10.0.26.1

2、ifcfg-eth1

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth1

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0

SLAVE=yes

3、ifcfg-eth2

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth2

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0

SLAVE=yes

4、/etc/modprobe.conf配置

alias eth0 pcnet32

alias scsi_hostadapter mptbase

alias scsi_hostadapter1 mptspi

alias scsi_hostadapter2 ata_piix

alias net-pf-10 off

alias ipv6 off

options ipv6 disable=1

alias eth1 pcnet32

alias eth2 pcnet32

alias bond0 bonding

options   bonding   millmon=100 mode=1

二、查看狀態

1、重啟網路

 /etc/init.d/network restart

2、查看bond運行狀態

cat /proc/net/bonding/bond0 

Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)

Bonding Mode: load balancing (round-robin)

MII Status: up

MII Polling Interval (ms): 1

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth1

MII Status: up

Speed: 100 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:50:56:a2:4d:00

Slave Interface: eth2

MII Status: up

Speed: 100 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:50:56:a2:4d:01

三、測試bond

1、斷開eth1網口

[[email protected] network-scripts]# ifdown eth1

2、查看bond狀態,eth1已經掉線,現在eth2接管

[[email protected] network-scripts]# cat /proc/net/bonding/bond0 

Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)

Bonding Mode: load balancing (round-robin)

MII Status: up

MII Polling Interval (ms): 1

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth2

MII Status: up

Speed: 100 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:50:56:a2:4d:01

3、啟用eth1

[[email protected] network-scripts]# ifup eth1

4、查看bond狀態,eth1上線,但是網路流量還是在eth2上跑,eth1作為備份。(之前eth1是承載流量)

[[email protected] network-scripts]# cat /proc/net/bonding/bond0 

Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)

Bonding Mode: load balancing (round-robin)

MII Status: up

MII Polling Interval (ms): 1

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth2

MII Status: up

Speed: 100 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:50:56:a2:4d:01

Slave Interface: eth1

MII Status: up

Speed: 100 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:50:56:a2:4d:00



本文出自 “lose” 部落格,請務必保留此出處http://blove.blog.51cto.com/3116850/1536064

聯繫我們

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