etherchannel

21
Thomas Moegli Ing. HES Télécommunications - Réseaux et Sécurité IT Etherchannel 1

Upload: thomas-moegli

Post on 15-Apr-2017

566 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: EtherChannel

Thomas Moegli Ing. HES Télécommunications - Réseaux et Sécurité IT

Etherchannel

1

Page 2: EtherChannel

Thomas Moegli

๏ Technologie permettant de regrouper plusieurs liens physiques en un seul lien logique

๏ EtherChannel : Technologie Port Channeling sous Cisco ๏ Sans EtherChannel, lors d’une interconnexion entre deux

switchs ๏ Le protocole Spanning-Tree bloque les liens redondants ๏ Les protocoles de routage voient les liens multiples de

manière individuelle et ne font pas de la répartition de charge

Port Channeling

Sans EtherChannel

2

Page 3: EtherChannel

Thomas Moegli

๏ Technologie permettant de regrouper plusieurs liens physiques en un seul lien logique

๏ EtherChannel : Technologie Port Channeling sous Cisco ๏ Sans EtherChannel, lors d’une interconnexion entre deux

switchs ๏ Le protocole Spanning-Tree bloque les liens redondants ๏ Les protocoles de routage voient les liens multiples de

manière individuelle et ne font pas de la répartition de charge

Port Channeling

Avec EtherChannel

3

Page 4: EtherChannel

Thomas Moegli

๏ Utilisé pour agréger la bande passante sur plusieurs interfaces L2/L3

๏ Permet d’augmenter la bande passante et la redondance en agrégeant des liens individuels entre switchs

๏ Deux protocoles utilisés pour EtherChannel ๏ PAgP : Port Aggregation Protocol

๏ Technologie Cisco, ne fonctionne qu’entre switchs Cisco

๏ LACP : Link Aggregation Control Protocol ๏ Standard IEEE ๏ Interconnexion avec des switchs non-Cisco

Etherchannel

Switch Cisco Switch Non Cisco

Switch Cisco

EtherchannelLACP uniquement

EtherchannelLACP ou PAgP

4

Page 5: EtherChannel

Thomas Moegli

๏ EtherChannel effectue de l’équilibrage de charge sur plusieurs liens physiques

๏ Jusqu’à 8 liens peuvent être combinés en un lien logique ๏ EtherChannel peut être configuré en couche 2 ou en couche 3

๏ Sur Cisco, une interface logique est appelée Port-Channel

EtherchannelSwitch Cisco

Switch Cisco

Fa0/1

Fa0/2

Fa0/3

Fa0/4

Fa0/1

Fa0/2

Fa0/3

Fa0/4

Switch Cisco

Switch Cisco

Po1

Po1

=

5

Page 6: EtherChannel

Thomas Moegli

๏ Protocoles de négociation pour une configuration dynamique

๏ Protocoles : ๏ PAgP : Port Aggregation Protocol

๏ Propriétaire Cisco

๏ LACP : Link Aggregation Control Protocol (IEEE 802.3ad)

Etherchannel Protocoles

6

Page 7: EtherChannel

Thomas Moegli

๏ Protocole propriétaire Cisco ๏ Modes PAgP

๏ On Pas de négociation / Force le canal sur PAgP

๏ DesirableEnvoi de messages PAgP pour initier la négociation

๏ AutoEcoute passive des messages PAgP

Etherchannel PAgP

SW2On Desirable Auto

On

Desirable

Auto

SW1

๏ Etablissement d’un canal EtherChannel selon les ports configurés :

SW1 SW2

7

Page 8: EtherChannel

Thomas Moegli

๏ Protocole standard IEEE 802.3ad ๏ Modes LACP

๏ On Pas de négociation / Force le canal sur LACP

๏ Active Envoi de messages LACP pour initier la négociation

๏ PassiveEcoute passive des messages LACP

Etherchannel LACP

SW2On Active Passive

On

Active

Passive

SW1

๏ Etablissement d’un canal EtherChannel selon les ports configurés :

SW1 SW2

8

Page 9: EtherChannel

Thomas Moegli

Etapes

๏ Configurer les ports pour qu’ils aient des paramètres identiques (Configuration d’interface) ๏ Configuration MDI-X (Medium Dependent Interface Crossover), du débit et du mode de transmission :

๏ Configuration de l’interface avec un mode PAgP ou LACP.Création du port logique (appelé Port-Channel) :

Etherchannel Configuration : Couche 2

Switch(config-if)# duplex autoSwitch(config-if)# speed autoSwitch(config-if)# mdix auto

Switch(config-if)# channel-group channel-id mode [active|auto|desirable|on|passive]

9

Page 10: EtherChannel

Thomas Moegli

๏ Configuration de plusieurs liens physiques en un seul lien logique ๏ Ce lien logique sera configuré comme lien de trunk entre SW1 et SW2

Etherchannel Configuration : Couche 2

Switch Cisco

Switch Cisco

Fa0/1

Fa0/2

Fa0/3

Fa0/4

Fa0/1

Fa0/2

Fa0/3

Fa0/4

Switch Cisco

Switch Cisco

Po1

Po1

=

SW1

SW2

SW1(config)# interface range FastEthernet0/1 - 4SW1(config-if-range)# duplex auto SW1(config-if-range)# speed auto SW1(config-if-range)# mdix auto SW1(config-if-range)# channel-group 1 mode desirable

SW1(config)# interface Port-Channel 1 SW1(config-if)# switchport trunk encapsulation dot1q SW1(config-if)# switchport mode trunk

SW1

SW2

SW2(config)# interface range FastEthernet0/1 - 4SW2(config-if-range)# duplex auto SW2(config-if-range)# speed auto SW2(config-if-range)# mdix auto SW2(config-if-range)# channel-group 1 mode desirable ! Le mode Auto est également possible

SW2(config)# interface Port-Channel 1 SW2(config-if)# switchport trunk encapsulation dot1q SW2(config-if)# switchport mode trunk

10

Page 11: EtherChannel

Thomas Moegli

Etherchannel Commandes de vérification

Commande Descriptionshow interface interface-id Affiche des informations détaillées sur l’interface (Physique ou virtuelle)show etherchannel summary Affiche des informations globales sur la configuration EtherChannelshow etherchannel port-channel Affiche des informations détaillées sur les interfaces PortChannel configurées

11

Page 12: EtherChannel

Thomas Moegli

๏ La commande Switch# show ip interface br permet d’afficher le status de l’interface logique EtherChannel crée ๏ Pour un fonctionnement correct, Status et Protocol doivent être sur On

Etherchannel

Vérification : show ip interface brief

Switch# show ip interface brief

SW1# show ip interface brief Interface IP-Address OK? Method Status Protocol Ethernet1/1 unassigned YES unset up up Ethernet1/2 unassigned YES unset up up Ethernet1/3 unassigned YES unset up up Ethernet2/0 unassigned YES unset up up Ethernet2/1 unassigned YES unset up up Ethernet2/2 unassigned YES unset up up Ethernet2/3 unassigned YES unset up up Port-channel1 unassigned YES unset up up SW1#

12

Page 13: EtherChannel

Thomas Moegli

๏ La commande Switch# show ip interface br permet d’afficher des informations détaillées sur l’interface logique EtherChannel crée

๏ Permet d’afficher notamment les interfaces physiques liées à l’interface EtherChannel virtuelle

Etherchannel

Vérification : show interface interface-idSW1# show interface Port-Channel 1 Port-channel1 is up, line protocol is up (connected) Hardware is Ethernet, address is aabb.cc00.0a11 (bia aabb.cc00.0a11) MTU 1500 bytes, BW 40000 Kbit/sec, DLY 1000 usec, reliability 255/255, txload 136/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Auto-duplex, Auto-speed, media type is unknown input flow-control is off, output flow-control is unsupported Members in this channel: Et1/0 Et1/1 Et1/2 Et1/3 ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:05, output never, output hang never Last clearing of "show interface" counters never Input queue: 480/2000/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 21419000 bits/sec, 44593 packets/sec …

Switch# show interface interface-id

13

Page 14: EtherChannel

Thomas Moegli

๏ La commande :donne les informations sur le lien EthernetChannel

SW1# show etherchannel summary Flags: D - down P - bundled in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 U - in use f - failed to allocate aggregator

M - not in use, minimum links not met u - unsuitable for bundling w - waiting to be aggregated d - default port

Number of channel-groups in use: 1 Number of aggregators: 1

Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) PAgP Et1/0(P) Et1/1(P) Et1/2(P) Et1/3(P)

Switch# show etherchannel ?

Etherchannel

Vérification : show etherchannel

14

Page 15: EtherChannel

Thomas Moegli

๏ La commande :donne les informations sur le lien EthernetChannel

๏ Pour obtenir des informations détaillées sur le port virtuel, spécifier le mot-clé port-channel

SW1# show etherchannel port-channel Channel-group listing: ----------------------

Group: 1 ---------- Port-channels in the group: ---------------------------

Port-channel: Po1 ------------

Age of the Port-channel = 0d:00h:37m:24s Logical slot/port = 16/0 Number of ports = 4 GC = 0x00010001 HotStandBy port = null Port state = Port-channel Ag-Inuse Protocol = PAgP Port security = Disabled

Ports in the Port-channel:

Index Load Port EC state No of bits ------+------+------+------------------+----------- 0 00 Et1/0 Desirable-Sl 0 0 00 Et1/1 Desirable-Sl 0 0 00 Et1/2 Desirable-Sl 0 0 00 Et1/3 Desirable-Sl 0

Time since last port bundled: 0d:00h:35m:48s Et1/2

Switch# show etherchannel port-channel

Etherchannel

Vérification : show etherchannel

15

Page 16: EtherChannel

Thomas Moegli

๏ Soit la topologie suivante : ๏ SW2 est configuré pour être Root Bridge, ses ports sont à l’état Forwarding car ils sont DP ๏ SW1 est configuré avec EtherChannel pour regrouper les trois interfaces en une interface logique. ๏ L’interface logique étant considéré comme Root Port dans STP, les interfaces physiques sont donc Root Port ๏ Il en résulte donc une boucle !

๏ Si SW1 envoie une trame broadcast à SW2 via son interface virtuelle et que celle-ci utilise l’interface physique Fa0/1, SW2 va ensuite proposer cette trame sur les interfaces Fa0/2 et Fa0/3 puisqu’ils ne sont pas configurés en EtherChannel. SW1 reçoit la trame à double

Etherchannel Misconfiguration Guard

Root BridgeFF

F

SW2SW1

F

B

STP : Port à l’état Forwarding

STP : Port à l’état Blocked

F

interface range Fa0/1 - 3switchport mode on

Fa0/1

Fa0/2

Fa0/3

Fa0/1

Fa0/2

Fa0/3

Pas de msgs PagP ou LACP transmis

Pas de configuration EtherChannel

16

Page 17: EtherChannel

Thomas Moegli

๏ La fonction Misconfiguration Guard permet de détecter ce genre de problèmes ๏ Lorsque les ports sont regroupés dans un lien EtherChannel, ils partagent une adresse MAC unique

๏ Tous les BPDUs qui sont transmis sur les interfaces physiques d’un même lien EtherChannel utilisent le même Sending-Port-ID

๏ Fonctionnement de Misconfiguration Guard ๏ Actif par défaut ๏ En reprenant la topologie ci-dessus, lorsque SW1 reçoit les trames BPDUs de SW2, il s’attend à recevoir des trames sur toutes

les interfaces physiques reliées à SW2 ๏ Toutefois, il vérifie que les trames reçues sur chaque interface physique connectée à SW2 possède le même STP Port-ID.

Si ce n’est pas le cas, il détecte que EtherChannel n’est pas configuré sur le switch voisin et place les ports dans l’état err-disable.

Etherchannel Misconfiguration Guard

17

Page 18: EtherChannel

Thomas Moegli

Configuration ๏ Activation de Misconfiguration Guard :

๏ Vérifier que Misconfiguration Guard est actif :

Etherchannel Misconfiguration Guard

Switch(config)# spanning-tree etherchannel guard misconfig

Switch# show spanning-tree summary Switch is in past mode Root bridge for: none Extended system ID is enabled PortFast Default is disabled PortFast BPDU Guard Default is disabled PortFast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is enabled

18

Page 19: EtherChannel

Thomas Moegli

๏ EtherChannel opère de l’équilibre de charge sur tous les liens physiques du groupe EtherChannel

๏ Il existe plusieurs méthodes d’équilibre de charge sur les liens :

๏ Via l’adresse IP Source ๏ Via l’adresse IP Destination ๏ Une combinaison de l’adresse IP Source et Destination ๏ …

Etherchannel Options Load-Balancing

IP : 1.1.1.1

PC A

IP : 2.2.2.2

PC B

Serveur 1

Load-Balancevia Adresse IP Source

IP : 1.1.1.1

PC A

IP : 2.2.2.2

PC B

Srv1

Load-Balancevia Adresse IP Destination

Srv2

IP : 20.0.0.2 IP : 30.0.0.3

IP : 3.3.3.3

PC C

IP Src : 1.1.1.1IP Dst : 20.0.0.2

IP Src : 2.2.2.2IP Dst : 30.0.0.3

IP Src : 3.3.3.3IP Dst : 20.0.0.2

19

Page 20: EtherChannel

Thomas Moegli

๏ Configuration via la commande :

Etherchannel Options Load-Balancing

Commande Description Modèles compatiblesdst-ip Adresse IP de destination Tous les modèlesdst-mac Adresse MAC de destination Tous les modèlessrc-dst-ip Adresse IP source et destination Tous les modèlessrc-dst-mac Adresse MAC source et destination Tous les modèlessrc-ip Adresse IP source Tous les modèlessrc-mac Adresse MAC source Tous les modèlessrc-port Numéro de port source Catalyst 4500, 6500dst-port Numéro de port destination Catalyst 4500, 6500src-dst-port Numéro de port source et destination Catalyst 4500, 6500

Switch(config)# port-channel load-balance options

20

Page 21: EtherChannel

Thomas Moegli

๏ Un Etherchannel Layer 3 permet de regrouper un ensemble logique de ports en une interface virtuelle qui peut être configurée pour effectuer du routage

Layer 3 EtherChannel

SW1(config)# interface range FastEthernet0/5 - 8SW1(config-if-range)# duplex autoSW1(config-if-range)# speed autoSW1(config-if-range)# mdix auto SW1(config-if-range)# no switchport ! Ce port est de couche 3 SW1(config-if-range)# channel-group 1 mode on

SW1(config)# interface Port-Channel 1 SW1(config-if)# no switchport SW1(config-if)# ip address 10.1.1.1 255.255.255.252

SW1(config)# ip routing ! Active le routage sur ce switch

Po1

Fa0/5

Fa0/6

Fa0/7

Fa0/8

21