🔷 Module C3 – Commandes switchs Cisco (STP, Port-security, EtherChannel)

📘 Cours complet ⏱️ 4h 🎯 Bloc 2 – SISR
Objectifs : maîtriser les commandes de configuration des switchs Cisco : VLAN, trunk, Spanning Tree (STP) avancé, port-security, EtherChannel.

📖 Introduction

Les switchs Cisco sont au cœur des infrastructures réseau. Ce module vous présente les commandes essentielles pour configurer les VLAN, les trunks, Spanning Tree (STP) avec ses optimisations, la sécurité des ports et l'agrégation de liens (EtherChannel).

🎯

À l'issue de ce module, vous serez capable de :

  • Créer et gérer des VLAN.
  • Configurer des ports en mode access et trunk.
  • Maîtriser Spanning Tree (portfast, root guard, BPDUguard).
  • Sécuriser les ports avec port-security (sticky MAC, violation).
  • Configurer EtherChannel (LACP, PAgP).

📐 Gestion des VLAN

🔀 Trunk

🌳 Spanning Tree Protocol (STP)

🔒 Port-security

🔗 EtherChannel (Agrégation de liens)

🛠️ Mise en pratique

Configuration complète d'un switch (VLAN, trunk, STP, port-security, EtherChannel)

Exemple complet :

Switch# configure terminal
Switch(config)# hostname SW1
SW1(config)# vlan 10
SW1(config-vlan)# name IT
SW1(config-vlan)# vlan 20
SW1(config-vlan)# name RH
SW1(config-vlan)# exit

SW1(config)# interface range fastEthernet 0/1-10
SW1(config-if-range)# switchport mode access
SW1(config-if-range)# switchport access vlan 10
SW1(config-if-range)# spanning-tree portfast
SW1(config-if-range)# spanning-tree bpduguard enable
SW1(config-if-range)# switchport port-security
SW1(config-if-range)# switchport port-security maximum 1
SW1(config-if-range)# switchport port-security violation shutdown
SW1(config-if-range)# exit

SW1(config)# interface fastEthernet 0/24
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk allowed vlan 10,20
SW1(config-if)# switchport trunk native vlan 99
SW1(config-if)# exit

SW1(config)# interface range fastEthernet 0/22-23
SW1(config-if-range)# channel-group 1 mode active
SW1(config-if-range)# exit
SW1(config)# interface port-channel 1
SW1(config-if)# switchport mode trunk
SW1(config-if)# end

SW1# write memory
  • Création des VLAN 10 et 20.
  • Ports 1 à 10 : accès VLAN 10, Portfast, BPDUguard, port-security à 1 MAC.
  • Port 24 : trunk autorisant VLAN 10 et 20, VLAN natif 99.
  • Ports 22-23 : EtherChannel LACP, trunk sur le port-channel.

📝 Exercices d'application

Exercice 1 – Port-security

Quelle commande active la sécurisation d'un port avec une seule MAC autorisée ?

switchport port-security ; switchport port-security maximum 1

Exercice 2 – EtherChannel

Quel protocole standard permet l'agrégation de liens ?

LACP (IEEE 802.3ad)

🎯 Quiz d'auto‑évaluation

1. La commande spanning-tree portfast :

2. BPDUguard désactive un port s'il reçoit :

3. La commande switchport trunk allowed vlan 10,20 :

4. Un port en état "err-disabled" suite à une violation port-security peut être réactivé avec :

5. EtherChannel avec LACP utilise le mode :

📚 Ressources


← Retour au portail
BTS SIO – Lycée NDLP Avranches – Module C3 v2.0