Dans le terminal rentrer dans la conf :
enable
conf t
| Afficher les ports | show interfaces status |
| Selectionner ports | interface range nomport 0/2-24 (select port 2 à 24) |
| Mode du port | switchport mode access/trunk |
| Creation d’un vlan | vlan 20 name nomVLAN |
| Activer le vlan sur les ports | switchport mode trunk |
| Vlan untag | switchport trunk native vlan 20 |
| Vlan tagged | switchport trunk allowed vlan 1,20 ou pour enlever: switchport trunk allowed vlan remove 1,20 |
| Activer sécurité | switchport port-security |
| Sticky port | switchport port-security mac-address sticky |
| Réactiver port | Switch(config)#inter fastethernet 0/2 Switch(config-if)#shutdown Switch(config-if)#no shutdown |
| Afficher les adresses MAC sécurisées : | Switch#show port-security address |
| Limiter nombre d’adresse mac par port | switchport port-security maximum 2 |
| Activer le snooping | ip dhcp snooping interfacefastethernet 0/x ip dhcp snooping trust ip dhcp snooping limit rate x |
| Changer la réaction en cas de non respect | switchport port-security violation {protect | restrict | shutdown} |
| Sauvegarder la conf : | Write memory (ou wr) |
| Verifier si spanning tree actif | show spanning-tree summary |
| Changer le mode STP | spanning-tree mode {rapid-pvst | pvst | mst} |
| Mettre tous les ports d’accès en PortFast (evite délai d’écoute) | spanning-tree portfast default |
| Activer BPDU Guard sur tous les ports PortFast (protege contre les boucles) | spanning-tree portfast bpduguard default |