00 - Commande_switch_basique
11) sécurisation
Switch(config)# enable password <votre mot de passe> (stocké en clair dans la configuration : show running-config)
Switch(config)# enable secret <votre mot de passe> (hash visible dans la configuration : secret5)
// Mettre en place une authentification à la connexion
Switch(config)#line con 0
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config)#service password-encryption // Masquer les mots de passe de connexion dans la configuration
Switch(config)#banner motd # <message> #
2 ) commande de configuration plan réseau
switch(config)# hostname S3 // change le nom du switch
S3(config)# interface vlan 10 // ajout du vlan 10
Switch3(config-if)# ip address 192.168.10.0 255.255.255.192 // attribution de l'ip et du masque
2)3) Commande afin de vérifier tout type de configurationvisualisation / sauvegarde
show running-config // elle fournit la pluspart des informations sur le commutateur
do show run // examiner la configuration
do show vlan // consulter tout les vlans
copy running-config startup-config //Elle sauvegarde la configuration actuelle pour qu’elle soit conservée même après un redémarrage.
show interfaces status //affiche le statut des interfaces
show interface fastEthernet 0/X // affiche des informations sur l’interface spécifiée
show interfaces trunk // affiche les interfaces de type trunk et les VLAN transitant sur celles-ci
show spanning-tree (interface fa0/x // vlan x) // affiche les informations à propos du protocole spanning tree
4) exportation configuration en texte
//Exporter la configuration vers un fichier texte par tftp (running / startup config)
SW3#copy running-config tftp
Address or name of remote host []? 10.10.0.2
Destination filename [SW50-confg]?
Writing running-config....!!
[OK - 1120 bytes]
1120 bytes copied in 3.008 secs (372 bytes/sec)
//Importer la configuration depuis un fichier texte par tftp vers run ou startup config :
SW3#copy tftp running-config
Address or name of remote host []? 10.10.0.2
Source filename []? SW50-confg
Destination filename [running-config]? running-config
Accessing tftp://10.10.0.2/SW50-confg...
Loading SW50-confg from 10.10.0.2: !
[OK - 1120 bytes]
1120 bytes copied in 0.006 secs (186666 bytes/sec)