Cisco
De Linuxmemo.
(Différences entre les versions)
(→Obtenir des informations sur un routeur inconnu) |
(→Obtenir des informations sur un routeur inconnu) |
||
Ligne 20 : | Ligne 20 : | ||
show idprom chassis | show idprom chassis | ||
show idprom power-supply 1 | show idprom power-supply 1 | ||
+ | show running-config | ||
==Astuces== | ==Astuces== |
Version du 12 février 2015 à 10:36
Sommaire |
Les modes d'utilisation console
Mode "User EXEC": entrer par défaut
routeur>
Mode "Privileged EXEC": entrer par "enable", sortir par "disable"
routeur#
Mode "Global configuration": entrer par "configure terminal"
router(config)#
Mode "Interface configuration": entrer depuis le mode Global configuration par "interface type numero"
Router(config-if)#
- Sortir du mode privilégier EXEC: Ctrl-Z ou commande "exit".
Obtenir des informations sur un routeur inconnu
show version show flash show hardware show diagbus show module show idprom ? show idprom backplane show idprom chassis show idprom power-supply 1 show running-config
Astuces
Voir les connexions (netstat)
show tcp brief
Dynamips
Sécurisation
R1(config)# security passwords min-length 10 R1(config)# security authentication failure rate 4 log R1(config)# login block-for 60 attempts 4 within 10 R1(config)# ip access-list standard login-permit-adm R1(config-std-nac)# permit 172.16.20.0 0.0.0.255 R1(config)# exit R1(config)# login quiet-mode access-class login-permit-adm
// Ligne auxiliaire R1(config)# line aux 0 R1(config-line)# no password R1(config-line)# login R1(config-line)# exit // Lignes virtuelle R1(config)# line vty 0 4 R1(config-line)# exec-timeout 5 R1(config-line)# no password R1(config-line)# login R1(config-line)# exit R1(config)# service tcp-keepalives-in
R1(config)# line vty 0 4 R1(config-line)# no transport input R1(config-line)# transport input ssh R1(config-line)# exit
R1(config)# hostname Ottawa // définition du nom d’hôte) Ottawa(config)# ip domain-name cisco.com // définition du nom de domaine) Ottawa(config)# crypto key generate rsa // génération des clés asymétriques Ottawa(config)# username emabo secret cisco123 Ottawa(config)# line vty 0 4 Ottawa(config-line)# transport input ssh
// configuration de l’authentification locale et VTY Ottawa(config-line)# login local Ottawa(config)# ip ssh time-out 10 // configuration des délais d’attente ssh Ottawa(config)# ip ssh authentication-retries 3 // configuration des délais d'essai à nouveau ssh
R1(config)# no service finger // exemple du service finger
Interface en ligne de commande avec Tcl
Les routeurs Cisco embarquent le langage Tcl via IOS. Ce qui donne accès à une interface en ligne de commande.
Exemple : tester des adresses IP
tclsh foreach adresse { 172.1.1.1 172.1.1.2 172.1.1.3 172.1.1.4 } {ping $adresse} tclquit
Virtualisation
This is the main component that provides the Cisco IOS emulator as well as PEMU wrapper
Dynagen
This is the interface to the dynamips software, it provides a simplified ini type configuration, frame-relay, built in switch, bridge as well as a management CLI.
gns3