Premessa
Questo breve articolo mostra come eseguire l’updrade dell’IOS esistente su di un router 2520. La modalità è leggermente differente da quanto io stesso ho trovato in rete, valido per modelli più avanzati. Ho notato che questa qui descritta, automatizza alcune operazioni come quella di cancellare l’immagine IOS esistente e di variare i parametri di boot. Su questo router è stata rimpiazzata la versione c2500-is-l_112-111.bin con la c2500-is-l.123-16.bin
Via con l’upgrade
Per prima cosa ci occore un server TFTP sul quale effettuare una copia di backup del vecchio IOS, ma anche per caricare il nuovo. A tale scopo si può utilizzare il Cisco TFTP server disponibile per Windows oppure su ambienti Unix tftpd o atftpd ma va bene ovviamente qualunque altro server.
Altra cosa essenziale è che la interfaccia ethernet del router sia sulla stessa rete del server TFTP e che la procedura sia effettuata via console e no via telnet, in quanto le funzioni di routing sono disabilitate durante il processo. Detto questo possiamo procedere a configurare l’interfaccia ethernet del router con un indirizzo IP:
Router#configure terminal Router(config)#interface ethernet0 Router(config-if)#ip address 192.168.0.2 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit Router(config)#exit Router#
Adesso assicuriamoci che il server TFTP sia in esecuzione e lanciamo la procedura che copierà la vecchia versione dell’IOS sul TFTP
Router#copy flash tftp System flash directory: File Length Name/status 1 5867096 c2500-is-l_112-111.bin [5867160 bytes used, 10910056 available, 16777216 total] Address or name of remote host [255.255.255.255]? 192.168.0.1 Source file name? c2500-is-l.123-16.bin Destination file name [c2500-is-l.123-16.bin]? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK]
Ora possiamo copiare la nuova versione dell’IOS
Router#copy tftp flash **** NOTICE **** Flash load helper v1.0 This process will accept the copy options and then terminate the current system image to use the ROM based image for the copy. Routing functionality will not be available during that time. If you are logged in via telnet, this connection will terminate. Users with console access can see the results of the copy operation. ---- ******** ---- Proceed? [confirm] System flash directory: File Length Name/status 1 5867096 c2500-is-l_112-111.bin [5867160 bytes used, 10910056 available, 16777216 total] Address or name of remote host [255.255.255.255]? 192.168.0.1 Source file name? c2500-is-l.123-16.bin Destination file name [c2500-is-l.123-16.bin]? Accessing file 'c2500-is-l.123-16.bin' on 192.168.0.1... Loading c2500-is-l.123-16.bin from 192.168.0.5 (via Ethernet0): ! [OK] Erase flash device before writing? [confirm] Flash contains files. Are you sure you want to erase? [confirm] System configuration has been modified. Save? [yes/no]: y Building configuration... [OK] Copy 'c2500-is-l.123-16.bin' from server as 'c2500-is-l.123-16.bin' into Flash WITH erase? [yes/no]y %SYS-5-RELOAD: Reload requested %SYS-4-CONFIG_NEWER: Configurations from version 11.2 may not be correctly understood. %FLH: c2500-is-l.123-16.bin from 192.168.0.1 to flash ...
System flash directory: File Length Name/status 1 5867096 c2500-is-l_112-111.bin [5867160 bytes used, 10910056 available, 16777216 total] Accessing file 'c2500-is-l.123-16.bin' on 192.168.0.1... Loading c2500-is-l.123-16.bin from 192.168.0.1 (via Ethernet0): ! [OK] Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased Loading c2500-is-l.123-16.bin from 192.168.0.5 (via Ethernet0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 16228680/16777216 bytes] Verifying checksum... OK (0x3200) Flash copy took 0:07:47 [hh:mm:ss] %FLH: Re-booting system after download 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 Internetwork Operating System Software IOS (tm) 2500 Software (C2500-IS-L), Version 12.3(16), RELEASE SOFTWARE (fc4) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2005 by cisco Systems, Inc. Compiled Wed 24-Aug-05 05:13 by ssearch Image text-base: 0x0307D960, data-base: 0x00001000 cisco 2520 (68030) processor (revision N) with 14336K/2048K bytes of memory. Processor board ID 17602547, with hardware revision 00000003 Bridging software. X.25 software, Version 3.0.0. Basic Rate ISDN software, Version 1.1. 1 Ethernet/IEEE 802.3 interface(s) 2 Serial network interface(s) 2 Low-speed serial(sync/async) network interface(s) 1 ISDN Basic Rate interface(s) 32K bytes of non-volatile configuration memory. 16384K bytes of processor board System flash (Read ONLY) Configuration register is 0x2102
Router# Router#sh flash System flash directory: File Length Name/status 1 16228680 c2500-is-l.123-16.bin [16228744 bytes used, 548468 available, 16777212 total] 16384K bytes of processor board System flash (Read ONLY)
Ora il nostro router è pronto all’uso con la versione dell’IOS appena caricata