Cisco IOS pour les nuls !
Bonjour,
Aujourd’hui, je vous propose quelques notes pour la réinstallation d’un firmware Cisco IOS (Donc l’ancien OS Cisco) et quelques paramètres de base.
J’ai donc reçu au bureau un bon paquet de switch Cisco basé sur IOS ( 3560, 3750 … )
-1er étape : récupérer le firmware
Pour le récupérer, soit vous avez un contrat de support chez Cisco, soit vous vous débrouillez en cherchant sur le net …
Pour la version Cisco 3560, vous devez chercher un fichier du genre :
c3560-ipservicesk9-mz.122-53.SE.bin
-2eme étape : Utiliser HyperTerminal ou un équivalent pour récupérer le fichier avec le protocol xmodem
Perso ayant un mac, j’ai utilisé :
Une fois le l’hyperterminal lancé, connectez-vous via le port serie.
Allumez le switch, vous devriez voir :
Boot Sector Filesystem (bs) installed, fsid: 2 Base ethernet MAC Address: 00:14:f2:d2:41:80 Xmodem file system is available. The password-recovery mechanism is enabled. The system has been interrupted prior to initializing the flash filesystem. The following commands will initialize the flash filesystem, and finish loading the operating system software: flash_init boot switch:
-3eme étape : Initialisation du mode Flash file system
Une fois le switch booté en mode ROM, nous avons besoin d’initialiser la partie flash file system, tapez :
flash_init
Puis devrait apparaitre :
Initializing Flash... flashfs[0]: 1 files, 1 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 15998976 flashfs[0]: Bytes used: 12474880 flashfs[0]: Bytes available: 3524096 flashfs[0]: flashfs fsck took 10 seconds. ...done Initializing Flash. switch:
-4eme étape : Formatage de la mémoire
Pour repartir sur une base saine, nous allons formater la mémoire, tapez :
format flash:
Vous devriez voir apparaître :
Switch: format flash: Are you sure you want to format "flash:" (all data will be lost) (y/n)?y flashfs[0]: 0 files, 1 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440 flashfs[0]: Bytes used: 1024 flashfs[0]: Bytes available: 7740416 flashfs[0]: flashfs fsck took 12 seconds. Filesystem "flash:" formatted Switch:
-5eme étape : Paramétrage du débit et lancement du transfert de la ROM
Pour augmenter le débit entre votre machine et le switch (pour le transfert du fichier via xmodem), tapez :
set BAUD 115200
Puis lancez la copie du fichier :
switch: copy xmodem: flash:c3560-ipservicesk9-mz.122-53.SE.bin Begin the Xmodem or Xmodem-1K transfer now... CCC Starting xmodem transfer. Press Ctrl+C to cancel. Transferring c3560-ipservicesk9-mz.122-53.SE.bin... 100% 12181 KB 6 KB/s 00:31:56 0 Errors ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................................................................. ................. File "xmodem:" successfully copied to "flash:c3560-ipservicesk9-mz.122-53.SE.bin" switch:
-6eme étape : Mise à jour des parametres de boot et lancement
Sur le prompt « switch », tapez :
Puis :
unset BAUD
Votre switch est enfin pret, lancez le boot :
switch: boot Loading "flash:/c3560-ipservicesk9-mz.122-53.SE.bin"...@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ File "flash:/c3560-ipservicesk9-mz.122-53.SE.bin" uncompressed and installed, entry point: 0x1000000 executing... Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(53)SE, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2009 by Cisco Systems, Inc. Compiled Sun 13-Dec-09 15:45 by prod_rel_team Image text-base: 0x01000000, data-base: 0x02E00000 Initializing flashfs... flashfs[1]: 1 files, 1 directories flashfs[1]: 0 orphaned files, 0 orphaned directories flashfs[1]: Total bytes: 15998976 flashfs[1]: Bytes used: 12474880 flashfs[1]: Bytes available: 3524096 flashfs[1]: flashfs fsck took 1 seconds. flashfs[1]: Initialization complete....done Initializing flashfs. Checking for Bootloader upgrade.. not needed POST: CPU MIC register Tests : Begin POST: CPU MIC register Tests : End, Status Passed POST: PortASIC Memory Tests : Begin POST: PortASIC Memory Tests : End, Status Passed POST: CPU MIC interface Loopback Tests : Begin POST: CPU MIC interface Loopback Tests : End, Status Passed POST: PortASIC RingLoopback Tests : Begin POST: PortASIC RingLoopback Tests : End, Status Passed POST: Inline Power Controller Tests : Begin POST: Inline Power Controller Tests : End, Status Passed POST: PortASIC CAM Subsystem Tests : Begin POST: PortASIC CAM Subsystem Tests : End, Status Passed POST: PortASIC Port Loopback Tests : Begin POST: PortASIC Port Loopback Tests : End, Status Passed Waiting for Port download...Complete This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with U.S. and local laws, return this product immediately. A summary of U.S. laws governing Cisco cryptographic products may be found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html If you require further assistance please contact us by sending email to export@cisco.com. cisco WS-C3560-24PS (PowerPC405) processor (revision M0) with 131072K bytes of memory. Processor board ID CAT0928Z2EE Last reset from power-on 1 Virtual Ethernet interface 24 FastEthernet interfaces 2 Gigabit Ethernet interfaces The password-recovery mechanism is enabled. 512K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address : 00:14:F2:D2:D1:AF Motherboard assembly number : 73-9673-06 Power supply part number : 341-0029-03 Motherboard serial number : CAT09880NNZ Power supply serial number : LIT091091ZV Model revision number : M0 Motherboard revision number : A0 Model number : WS-C3560-24PS-S System serial number : CAT0911FAEE Top Assembly Part Number : 800-25861-03 Top Assembly Revision Number : A0 Version ID : V05 CLEI Code Number : COM1X1FARB Hardware Board Revision Number : 0x01 Switch Ports Model SW Version SW Image ------ ----- ----- ---------- ---------- * 1 26 WS-C3560-24PS 12.2(53)SE C3560-IPSERVICESK9-M Press RETURN to get started!
MEMO :
Créer un vlan :
switch(config)#vlan 2 switch(config-vlan)#name toto
Suppression d’un vlan :
switch(config)#no vlan 2
Affichage des vlans :
switch#show vlan
Affectation d’un port à un vlan :
switch(config)#interface fastEthernet 0/1 switch(config-if)#switchport mode access switch(config-if)#switchport access vlan 2
Création d’un trunk :
switch(config)#interface Ethernet 1/1 switch(config-if)#description trunk vers switch switch(config-if)#switchport mode trunk
Affectation d’un vlan au trunk précédemment créer :
Sauvegarde de la configuration :
switch#writemem
Bon courage ;)