Switch Cisco

Attribuer le nom du périphérique

hostname <nom>

Sécuriser le mode d'exécution utilisateur

line console <0>
password <mot_de_passe>
login

Sécuriser l'accès SSH / Telnet à distance

line vty <0 15>
password <mot_de_passe>
login

Sécuriser le mode d'exécution privilégié

enable secret <mot_de_passe>

Sécuriser tous les mots de passe dans le fichier de configuration

service <password-encryption>

Fournir un avertissement juridique

banner motd # <message> #

Configurer l'interface SVI de gestion

interface vlan <vlan_ID>
ip address <adresse_IP masque>
no shutdown

Enregistrez la configuration

copy <running-config startup-config>

Création VLAN

vlan <vlan_ID>
name <nomvlan_name>

Affectation d’un VLAN du port 1 au port 10

interface range <fa0/1-10>
switchport <mode access>
switchport <access vlan vlan_num>

Affectation d’un VLAN trunk à un port fa0/1 (vlan_num1 autorisé)

interface <fa0/1>
switchport <mode trunk>
switchport <trunk native vlan vlan_num>
switchport <trunk allow vlan vlan_num1>

Affichage table VLAN

show <vlan brief>

Affichage bref des interfaces

show <ip interface brief>

Affichage vlan associé au port fa0/1

show <interface fa0/1 switchport>

Affichage des liens Trunk et de leur spécification

show <interfaces trunk>