1. 程式人生 > >CentOS 6 / RHEL 6配置bonding 4模式

CentOS 6 / RHEL 6配置bonding 4模式

chan key election duplex part gre .com num rip

實現bond 802.3ad or 4 模式:(IEEE 802.3ad),

方式:創建一個整合的組,這個組會共享網速和網絡雙工(duplex)設置。模式 4 會根據 IEEE 802.3ad 標準使用活動組中的所有網絡接口

1、需要交換機配合配置,

2、兩端負載均衡模式:基於源IP和目的IP

系統配置:

/etc/modprobe.d/bonding.conf 

alias bond1 bonding
options bond1 mode=4 miimon=100 lacp_rate=fast xmit_hash_policy=layer2+3



/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE
=eth1 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bond1 SLAVE=yes /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bond1 SLAVE=yes /etc/sysconfig/network-scripts/ifcfg-bond1 DEVICE=bond1 IPADDR=IP地址 NETMASK=子網掩碼 BROADCAST=廣播地址 GATEWAY=網關 ONBOOT=yes BOOTPROTO
=static USERCTL=no TYPE=Ethernet

檢查配置:

cat /proc/net/bonding/bond1


Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: IEEE 802.3ad Dynamic link aggregation Transmit Hash Policy: layer2+3 (2) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 802.3ad info LACP rate: fast Aggregator selection policy (ad_select): stable Active Aggregator Info: Aggregator ID:
1 Number of ports: 2 Actor Key: 17 Partner Key: 1073 Partner Mac Address: 3c:e8:24:e8:df:20 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 80:18:44:e2:61:9d Aggregator ID: 1 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 80:18:44:e2:61:9e Aggregator ID: 1 Slave queue ID: 0

交換機的配置:

interface Eth-Trunk4
 port link-type access
 port default vlan 301
 mode lacp
 

參考:

技術分享圖片

CentOS 6 / RHEL 6配置bonding 4模式