switch#erase startup-config switch# delete flash:vlan.dat switch# delete flash:config.text switch# reload
switch(config)#banner motd !ACCES RESERVE !
switch(config)#hostname switch_VOSREVES
switch(config)#username etudiant password Btssio2017 switch(config)#username admin privilege 15 secret Rootsio2017
switch(config)#enable password Rootsio2017
switch(config)#line con 0 switch(config-line)# speed 9600 switch(config-line)#password Btssio2017 switch(config-line)#login local
switch#sh run
.De la même manière que pour le mode console configurez les lignes d’accès à distance : switch>en switch#conf t switch(config)#line vty 0 15 switch(config-line)# switch(config-line)# password Btssio2017 switch(config-line)#login local switch(config-line)#exit switch(config)#exit switch#exit .Affectez une adresse IP au switch sur le vlan 1 pour permettre la communication à distance par ethernet: switch>en switch#conf t switch(config)#ip default-gateway 172.17.255.253 switch(config)#ip name-server 172.17.0 .1 switch(config)#int vlan 1 switch(config-if)#ip address 172.17.1.X 255.255.0.0 switch(config-if)#no sh
communiter en ssh:……………………………………………………………….
.configurer un domaine pour le commutateur : Switch(config)#ip domain-name bts-sio.local . utiliser le chiffrement, il faut créer une clé RSA : Switch(config)#crypto key generate rsa general-keys modulus 1024 The name for the keys will be: Switch.bts-sio.local % The key modulus size is 1024 bits % Generating 1024 bit RSA keys, keys will be non-exportable...[OK] .Puis il faut activer l’accès en SSH. Switch(config)#ip ssh version 2 .Il est possible de rajouter des options : Switch(config)#ip ssh logging events (si disponible) Switch(config)#ip ssh time-out 60 Switch(config)#ip ssh authentication-retries 3 .configuration de l'authentification et l’ajout d'un compte administrateur Switch(config)#aaa new-model Switch(config)#aaa authentication login default local .Il est possible de désactiver l’accès en telnet Switch(config)#line vty 0 2 Switch(config-line)#access-class SSH_ACCESS in Switch(config-line)#login local Switch(config-line)#transport input ssh Switch(config-line)#transport output ssh Switch(config)#line vty 3 15 Switch(config-line)#transport input none . enregistrer la running-config dans la nvram Switch#copy running-config startup-config Switch#reload .Reset du switch Switch#en Switch#erase startup-config (ou nvram) Switch#erase running-config Switch#dir flash : Switch#delete flash:vlan.dat Switch#delete flash:config.text Switch#reload