Commandes switch CISCO

Transcription

Commandes switch CISCO
Commandes switch CISCO
Selectionner plusieurs interfaces :
conf term
Interface range fa0/1 – 15
Interface range fa0/1,15
Information sur le switch :
show running-config
show version
Information sur les interfaces :
show mac address-table
show interface
Initialization du switch :
delete vlan.dat
copy nvram:startup-sauv nvram:startup-config
Voir l’adresse IP et MAC de chaque port : show arp
Activer Telnet :
conf t
line vty 0 15
password valeurPassword
login
Changer l’IP telnet :
conf term
interface VLAN numeroVlanAdministration
ip address adressIP maskAddressIP
Changer durée de bail de table arp : conf term
mac-address-table aging-time duréeEnSeconde
Forcer la vitesse d’un port :
conf term
Interface fa0/2
speed vitesseBandePassante
Interdire une adresse MAC :
conf term
mac-address-table static adressMAC vlan 1 drop
Sécurité du port :
//Activation de la sécurité des ports
//Limite les transmissions à un poste
//Affectation par apprentissage
//Affectation statique
//Arrêt de transmission
//Arrêt du port
conf term
Interface nomInterface
switchport mode access
switchport port-security
switchport port-security maximum 1
switchport port-security mac-address sticky
switchport port-security mac-address 0002.16E8.C285
switchport port-security violation restrict
switchport port-security violation shutdown
Sauvegarde de la config :
copy startup-config tftp:nomSauvegardeConfig
Sauvegarde du system :
copy flash:nomSystem tftp:nomSauvegardeSystem
Création du VLAN :
Switch# vlan database
Switch(vlan)# vlan numéro-de-vlan name nom-de-vlan
Switch(vlan)# exit
Associer un VLAN à une interface: Switch(config)# interface fastethernet 0/9
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan numéro-de-vlan
Résumer Commande CISCO
Page 1
Déclarer une interface en mode trunk pour seulement les VLAN 20 et 30 :
Switch(config)# interface fastethernet 0/1
Switch(config-if)# switchport mode trunk
Switchport trunk allowed vlan 20,30
(Switch(config-if)# switchport trunk encap dot1q)
Remarque: La dernière commande n'existe pas sur les commutateurs 2950 car seule l'encapsulation
802.1q est supportée.
Voir les informations sur les VLANs :
show vlan
show vlan brief
show vlan id numéro-de-vlan
Activer du SPAN sur l’interface :
conf term
monitor session session_number source interface interface-id [, | -] [both | rx | tx]
Désactiver le spanning tree sur un vlan :
conf term
no spanning vlan numeroVLAN
Définit le switch comme pont racine (principal ou secondaire) :
conf term
spanning-tree vlan id_de_vlan root primary|secondary
Définit la priorité du switch (par défaut : 32768+ID du Vlan) : conf term
spanning-tree vlan id_de_vlan priority value
Modification de la priorité des ports (par défaut 128.numeroPort) :
conf term
interface fa0/1
spanning-tree port-priority valeur
spanning-tree cost 25
Modification du cout des ports :
Suppression de l’interface du processus de convergence STP :
Voir le résultat élection spanning-tree :
Définir un mot de passe enable :
interface fa0/1
spanning-tree portfast
show spanning-tree
enable secret motDePasse
Définir un domaine VTP : vtp domain nomDomaineVTP
Définir le mode VTP : vtp mode server/client
Définir la version VTP : vtp version 2
Définir un password VTP : vtp password nomPassword
Vérification du numéro de révision de configuration VTP : show vtp status
Afficher des statistiques sur les annonces envoyées et reçues sur le commutateur : show vtp counters
Elagage VTP (activer sur un seul commutateur serveur VTP du domaine) : vtp pruning
Configuration d’un port en mode DTP :
interface nomInterface
switchport mode dynamic auto|desirable
Désactivation du mode DTP :
switchport nonegociate
Activation de ssh :
ip domain-name mondomaine.fr
//Crée une paire de clés rsa
crypto key generate rsa
ip ssh version 1|2
line vty 0 15
//Interdit les connexions telnet
transport input ssh|telnet|all
//Permet de supprimer les clés rsa crypto key zeroize rsa
Résumer Commande CISCO
Page 2
Création d’un Etherchannel PAGP :
//Cas d’un mode access
//Cas du mode trunk
interface range nomInterface
switchport mode access/trunk
(switchport access vlan numeroVLAN)
(switchport trunk allowed vlan numeroVLAN)
channel-group numeroEtherchannel mode auto/desirable/on
//Dans le cas d’un switch en face auto/desirable = non-silent
//Dans le cas d’un serveur ou autre en face, on = silent
Création d’un Etherchannel LACP (IEEE) : interface range nomInterface
switchport mode access/trunk
//Cas d’un mode access
(switchport access vlan numeroVLAN)
//Cas du mode trunk
(switchport trunk allowed vlan numeroVLAN)
channel-group numeroEtherchannel mode active/passive/on
Configuration de l’etherchannel :
//Cas d’un mode access
//Cas du mode trunk
interface port-channel numeroEtherchannel
switchport mode access/trunk
(switchport access vlan numeroVLAN)
(switchport trunk allowed vlan numeroVLAN)
Configuration de la répartition de charge : port-channel load-balance dst-ip/dst-mac/src-dst-ip/src-dst-mac/
src-ip/src-mac
Effacer table mac d’un switch: clear mac-address-table
Résumer Commande CISCO
Page 3

Documents pareils