L'agrégation de lien ou etherchannel Kézako :

L'agrégation de liens est le regroupement de plusieurs ports physiques d'un switch pour augmenter sa bande passante. Par exemple l'agrégation de 2 ports 100Mb/s permet d'avoir un agrégat (une interface virtuel) de 200Mb/s, attention, car entre 2 machines vous n'aurez pas 200Mb/s (c'est du à la méthode de loadbalancing), il faut plusieurs machines pour qu'au global on s'approche des 200Mb/s. Dans la configuration cet agrégat ou etherchannel est vu/configuré comme un port channel raccourci à Po.

La tolérance aux pannes est un autre aspect essentiel de EtherChannel. Si un lien tombe, la charge est automatiquement redistribuée sur les liens restants. Ce processus de remise sur pied prend moins d'une seconde et est transparent aux applications réseau.

Schéma explicatif

Schéma Etherchannel

Link Aggregation avec EtherChannel :

Un EtherChannel permet d'aggréger de 1 à 8 ports physique, il y a la possibilité de modifier la méthode de load-balancing sur ces ports. Un EtherChannel peut être de niveau 2 ou niveau 3, de protocole standard LACP (Link Aggregation Control Protocol) IEEE 802.3ad, propriétaire Cisco PAgP (Port Aggregation Protocol) ou forcé. Les ports doivent être avoir le même duplex, speed et VLAN information. Attention, en fonction des modèles de switchs/IOS/protocole, un etherchannel sur des ports des switchs différent (cas par exemple dans un stack aussi appelé un etherchannel MEC "Multichassis EtherChannel") n'est pas possible.

Protocole Mode Description
PAgP Auto Ce mode PAgP met l'interface en négociation passive, c'est-à-dire qu'elle répond aux packets PAgP reçus mais n-initialise pas la négociation (défaut).
Desirable Ce mode de PAgP place l'interface en mode active, elle initialisera les négociation en envoyant des packets PAgP.
LACP Passive Ce mode LACP place l'interface en négociation passive (défaut).
Active Ce mode LACP place l'interface en négociation active.
- On Ce mode force l'interface en EtherChannel sans négociation, sans PAgP et sans LACP.
Off Désactive l'EtherChannel.

Matrice d'état en fonction du mode et protocole :

Matrice d'état

Paramètres additionnels pour LACP :

- system priority : chaque switch qui fait tourner du LACP a un system priority. Il peut être spécifié automatiquement ou en CLI (switch(config)# lacp system-priority 23456). LACP utilise la MAC du switch et le system priority pour former le system ID qui est utilisé durant la phase de négociation.

- port priority : cette priorité est configurée sur chaque port LACP, c'est configuré automatiquement ou en CLI (switch(config-if)# lacp port-priority 500 <= interface physique) . LACP utilise le port priority et le port number pour former le port identifier. Le port priority détermine quels ports seront mis en standby quand il y a des limitations hardware.

- administrative key : LACP configure automatiquement l'administrative key qui est égale à l'identifiant du channel-group configuré sur chaque port configuré avec LACP. L'adminitrative key définit la capacité d'un port à l'agrégation avec d'autres ports. La capacité d'un port à l'agrégation avec d'autres ports est déterminée par ces facteurs : caractéristiques physique du port comme le débit, duplex, media point à point ou partagé. restriction de configuration que vous avez établi.

- max bundle : restreindre le nombre max d'interface dans un channel (switch(config-if)# lacp max-bundle 2 <= interface port-channel).

D'autres options sont disponibles en fonction de l'IOS et du modèle de swicth.

Dans LACP quand l'équipement distant à plus de limitation comme le monbre max d'interface dans un channel, il place des interfaces en standby qui seront utilisées si un port active devient failed.

  • La configuration du port-channel affecte les port physiques.
  • La configuration de l'interface physique affecte seulement l'interface physique.
  • L'Etherchannel ne prendra pas forme si une des interfaces est un port destination SPAN.
  • Toutes les interfaces dans un etherchannel doivent avoir la même configuration :
    • Même speed et duplex
    • Même mode (access ou trunk)
    • Même native VLAN et VLANs autorisés sur le trunk
    • Même VLAN d'access sur le port
    • Configurer ces paramètres sur le port-channel

Configuration :

Commande Description
Switch(config)# interface range fastEthernet 0/10 - 11 On spécifie les interfaces qui vont former l'EtherChannel
Switch(config-if-range)# channel-protocol {pagp|lacp} Protocole de channel : PAgP ou LACP
Switch(config-if-range)# channel-group 2 mode {on|active|passive|auto|desirable} Mode de négociation et création du Po
Switch(config-if-range)# exit
Switch(config)# interface port-channel 2 On va configurer le Po précédement créé.
Switch(config-if)# switchport trunk encapsulation dot1q Configuration divers du port.
Switch(config-if)# switchport mode trunk Configuration divers du port.
Switch(config-if)# switchport trunk native vlan 99 Configuration divers du port.
Switch(config-if)# switchport trunk allowed vlan 2,4 Configuration divers du port.

Il est plus que conseillé de faire la configuration au niveau du Po sous peine de le "bloquer". Sauf pour le shutdown de port physique.

Commandes d'informations/configuration :

Liste des etherchannels configurés :

 1 Swicth# show etherchannel summary
 2 Flags:  D - down        P - bundled in port-channel
 3 I - stand-alone s - suspended
 4 H - Hot-standby (LACP only)
 5 R - Layer3      S - Layer2
 6 U - in use      f - failed to allocate aggregator
 7 
 8 M - not in use, minimum links not met
 9 u - unsuitable for bundling
10 w - waiting to be aggregated
11 d - default port
12 
13 
14 Number of channel-groups in use: 1
15 Number of aggregators:           1
16 
17 Group  Port-channel  Protocol    Ports
18 ------+-------------+-----------+-----------------------------------------------
19 1      Po1(SU)          -        Gi1/0/1(P)  Gi2/0/1(P)

Là nous avons 1 etherchannel forcé qui agrége 2 ports Giga, qu'il est Up, que les 2 ports sont montés.

Note : rien ne nous oblige à commencer le numéro de Po par 1. Le nombre maxi de Po dépend du modèle de switch.

Connaître le Po associé à un port physique :

1 Switch# show interface g1/0/1 etherchannel
2 Port state    = Up Mstr In-Bndl
3 Channel group = 1           Mode = On              Gcchange = -
4 Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
5 Port index    = 0           Load = 0x00            Protocol =    -
6 
7 Age of the port in the current state: 89d:11h:26m:09s

Informations d'un Po :

 1 Switch# show etherchannel 1 port-channel  
 2 Port-channels in the group:
 3 ---------------------------
 4 
 5 Port-channel: Po1
 6 ------------
 7 
 8 Age of the Port-channel   = 89d:11h:30m:25s
 9 Logical slot/port   = 10/1          Number of ports = 2
10 GC                  = 0x00000000      HotStandBy port = null
11 Port state          = Port-channel Ag-Inuse
12 Protocol            =    -
13 Port security       = Disabled
14 
15 Ports in the Port-channel:
16 
17 Index   Load   Port     EC state        No of bits
18 ------+------+------+------------------+-----------
19 0     00     Gi1/0/1  On                 0
20 0     00     Gi2/0/1  On                 0
21 
22 Time since last port bundled:    89d:11h:26m:56s    Gi1/0/1

Configurer la méthode de load balancing (du Po) :

1 Switch(config)# port-channel load-balance {dst-ip|dst-mac|src-dst-ip|src-dst-mac|src-ip|src-mac|src-port|dst-port|src-dst-port}

Vérification :

1 Switch#show etherchannel load-balance
2 EtherChannel Load-Balancing Configuration:
3 src-mac
4 
5 EtherChannel Load-Balancing Addresses Used Per-Protocol:
6 Non-IP: Source MAC address
7 IPv4: Source MAC address
8 IPv6: Source MAC address

Note : Méthode de load-balancing par défaut sur les 2960, 3560, 3750 est src-mac et src-dst-ip sur 4550 et 6500 (recommandé pour les switch L3).

Mais par ou on passe ...

La commande peut changer en fonction du modèle de swicth :

1 test etherchannel load-balance interface port-channel <port-channel XX> <mac/ip> <source address> <destination address>
2 
3 3750# test etherchannel load-balance interface port-channel 1 mac 0000.1111.2222 3333.4444.5555
4 Would select Gi1/0/1 of Po1

 1 4500-VSS-MEC# show platform software etherchannel port-channel 1 map ip 2.2.2.2 1.1.1.1
 2 
 3 Executing the command on VSS member switch role = VSS Active, id = 1
 4 
 5 Map port for Ip 2.2.2.2, 1.1.1.1 is Te1/1/1(Po1)
 6 NOTE: Software forwarded traffic will use Te1/1/1(Po1)
 7 
 8 Executing the command on VSS member switch role = VSS Standby, id = 2
 9 
10 Map port for Ip 2.2.2.2, 1.1.1.1 is Te2/1/1(Po1)
11 NOTE: Software forwarded traffic will use Te2/1/1(Po1)

!!!Attention!!! dans un VSS, un etherchannel de type MEC (Multi-chassis EtherChannel) privilégie le port de sortie qui est sur le même switch que le port d'entrée. MEC hash

1 6500# remote login switch
2 Trying Switch ...
3 Entering CONSOLE for Switch
4 Type "^CCC" to end this session
5 
6 6500-sp# test etherchannel load-balance interface po1 ip 1.1.1.1 2.2.2.2
7 Computed RBH: 0x5
8 Would select Gi2/2 of Po1