# Commandes

<span style="color: rgb(45, 194, 107);">Enregistrer la configuration active</span>  
<span style="color: rgb(230, 126, 35);"> write</span>

<span style="color: rgb(45, 194, 107);">Afficher la configuration active</span>  
<span style="color: rgb(230, 126, 35);"> show running-config</span>

<span style="color: rgb(45, 194, 107);">Informations matériels du switch</span>  
<span style="color: rgb(230, 126, 35);"> show version</span>

<span style="color: rgb(45, 194, 107);">Découvrir les équipements connectés</span>  
<span style="color: rgb(230, 126, 35);"> show cdp neighbors</span>

<span style="color: rgb(45, 194, 107);">Afficher les informations des PoE</span>  
<span style="color: rgb(230, 126, 35);"> show power inline</span>

<span style="color: rgb(45, 194, 107);">Afficher les différents TRUNK</span>  
<span style="color: rgb(230, 126, 35);"> show interfaces trunk</span>

<span style="color: rgb(45, 194, 107);">Afficher le détail des VLANs</span>  
<span style="color: rgb(230, 126, 35);"> show vlan</span>

<span style="color: rgb(45, 194, 107);">Créer un VLAN</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">conf t </span>  
<span style="color: rgb(230, 126, 35);">vlan 2</span>  
<span style="color: rgb(230, 126, 35);">vlan 2</span>

<span style="color: rgb(45, 194, 107);">Supprimer un VLAN</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">conf t </span>  
<span style="color: rgb(230, 126, 35);">vlan 2</span>  
<span style="color: rgb(230, 126, 35);">no vlan 2</span>

<span style="color: rgb(45, 194, 107);">Réinitialiser par défaut une interface</span>  
<span style="color: rgb(230, 126, 35);">enable </span>  
<span style="color: rgb(230, 126, 35);">conf t</span>  
<span style="color: rgb(230, 126, 35);">default interface range GigabitEthernet1/0/1 - 48</span>  
   
<span style="color: rgb(45, 194, 107);">Création d'un teaming LACP</span>  
  
<span style="color: rgb(230, 126, 35);">enable </span>  
<span style="color: rgb(230, 126, 35);">conf t </span>  
<span style="color: rgb(230, 126, 35);">interface range GigabitEthernet1/0/1 - 2 </span>  
<span style="color: rgb(230, 126, 35);">channel-group 1 mode active </span>  
<span style="color: rgb(230, 126, 35);">channel-protocol lacp </span>  
<span style="color: rgb(230, 126, 35);">exit</span>  
  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal </span>  
<span style="color: rgb(230, 126, 35);">interface port-channel 1 </span>  
<span style="color: rgb(230, 126, 35);">switchport trunk encapsulation dot1q </span>  
<span style="color: rgb(230, 126, 35);">switchport mode trunk </span>  
<span style="color: rgb(230, 126, 35);">switchport trunk allowed vlan add 1 </span>  
<span style="color: rgb(230, 126, 35);">exit</span>

<span style="color: rgb(45, 194, 107);">Statut de toutes les interfaces</span>  
<span style="color: rgb(230, 126, 35);"> enable </span>  
<span style="color: rgb(230, 126, 35);"> show interfaces status</span>

<span style="color: rgb(45, 194, 107);">statut d'une interface spécifique</span>  
<span style="color: rgb(230, 126, 35);"> enable</span>  
<span style="color: rgb(230, 126, 35);"> show interfaces Gi1/0/1 status</span>

<span style="color: rgb(45, 194, 107);">Désactiver une interface</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal</span>  
<span style="color: rgb(230, 126, 35);">interface gi1/0/1</span>  
<span style="color: rgb(230, 126, 35);">shutdown</span>  
<span style="color: rgb(230, 126, 35);">end</span>

<span style="color: rgb(45, 194, 107);">Modifier l'IP d'une interface  
</span><span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal</span>  
<span style="color: rgb(230, 126, 35);">interface Vlan3</span>  
<span style="color: rgb(230, 126, 35);">ip address 192.168.1.2 255.255.255.0</span>  
<span style="color: rgb(230, 126, 35);">exit</span>

<span style="color: rgb(45, 194, 107);">Ajouter une passerelle par défaut</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal</span>  
<span style="color: rgb(230, 126, 35);">ip default-gateway 10.0.0.60</span>

<span style="color: rgb(45, 194, 107);">Modifier un range de port</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal </span>  
<span style="color: rgb(230, 126, 35);">interface range GigabitEthernet1/0/1 - 48</span>

  
<span style="color: rgb(45, 194, 107);">Activer une interface</span>  
<span style="color: rgb(230, 126, 35);">enable</span>  
<span style="color: rgb(230, 126, 35);">configure terminal</span>  
<span style="color: rgb(230, 126, 35);">interface gi1/0/1</span>  
<span style="color: rgb(230, 126, 35);">no shutdown</span>  
<span style="color: rgb(230, 126, 35);">end</span>