Ubuntu 12.04 LTS et ethernet bonding en 802.3ad

J'ai eu pour défi de faire fonctionner sur des Dell R720 de l'ethernet bonding sur 2×4 des 12 port ethernet des machines des monstres que l'on m'a confié. Ces machines sont connecté sur des switch Brocade FastIron FCX648S

Je remercie d'ailleurs les deux tech réseau qui m'ont “supporté” (dans tout les sens du terme) durant les phases de test et Karles pour son "vieux" guide sur le Bonding

Ubuntu 12.04 LTS

/etc/modprobe.d/bonding.conf

# This file contains the bonding options used by ifenslave.
# See '/etc/network/interfaces' for bonding config parameters.

# Setup module aliases for all your bonds.
alias bond0 bonding
alias bond1 bonding

# Configure bonding options for all your bonds.
# BUG: You can only set one primary interface for one bond.
#      This is a limitation of the ifenslave package. :(
options bonding mode=4 lacp_rate=1 miimon=100 max_bonds=2 xmit_hash_policy=layer3+4 

# Load the bonding module.
probe bonding

Notez le xmit_hash_policy=layer3+4 qui est très important, sans cela : pas de répartition de charge sur les 4 interfaces (et donc pas 4x1G, soit ~4Gbps)

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
...
auto bond0
iface bond0 inet static
	address 192.168.21.1
	netmask 255.255.255.0
	bond-slaves none
	bond-mode 802.3ad
	bond-miimon 100
	bond-lacp-rate 1
	bond-primary eth4 eth5 eth6 eth7
...
auto eth4
iface eth4 inet manual
	bond-master bond0

auto eth5
iface eth5 inet manual
	bond-master bond0

auto eth6
iface eth6 inet manual
	bond-master bond0

auto eth7
iface eth7 inet manual
	bond-master bond0
...

Brocade FastIron FCX648S

sh run

Current configuration:
!
...
interface ethernet 1/1/4
 link-aggregate active
!
interface ethernet 1/1/5
 link-aggregate active
!
interface ethernet 1/1/6
 link-aggregate active
!
interface ethernet 1/1/7
 link-aggregate active
!
interface ethernet 1/1/14
 link-aggregate active
!
interface ethernet 1/1/15
 link-aggregate active
!
interface ethernet 1/1/16
 link-aggregate active
!
interface ethernet 1/1/17
 link-aggregate active
...

Test de Performance

root@Ubuntu1204LTS:~# iperf -c 192.168.21.2 -P 100 -t 60
------------------------------------------------------------
Client connecting to 192.168.21.2, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[102] local 192.168.21.1 port 53550 connected with 192.168.21.2 port 5001
...
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-60.0 sec   525 MBytes  73.4 Mbits/sec
...
[SUM]  0.0-60.6 sec  26.6 GBytes  3.77 Gbits/sec
blog/ubuntu_12.04_lts_et_ethernet_bonding_en_802.3ad.txt · Dernière modification: Tuesday 22 May 2012 par kathryl
Flux RSS du Blog Driven by DokuWiki Gentoo Powered Valid XHTML1.0 Powered by Apache PHP Powered Coffee Powered