Recuperando um IOS perdido
Postado por: Marcos Pitanga em Tutoriais, Artigos -
Imprima este post
Um administrador de rede, tentou efetuar uma atualização de seu IOS baixando do site da Cisco ou de algum outro como:
http://files.studioworks.ru/files/cisco/IOS/
Imagine que ao fazer um upgrade de IOS do seu roteador recebeu a seguinte mensagem:
If any of the above Memory Requirements are
“UNKNOWN”, you may be using an unsupported
configuration or there is a software problem and
system operation may be compromised.
Rounded IOMEM up to: 3Mb.
Not enough memory in the system to run this image
Required pmem/iomem: 58903810/336281
*** System received a Software forced crash ***
signal= 0×17, code= 0×200, context= 0×80005f64
PC = 0xffffffff, Vector = 0×200, SP = 0xffffffff
Não se desespere, vamos recarregar o IOS antigo ou outro IOS que possa ser colocado na sua flash que tenha memória suficiente para trabalhar.
Para isso, entre no modo rom monitor (rommon) e execute o comando tftpdnld
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 49152 Kbytes of main memory
rommon 1 > ?
alias set and display aliases command
boot boot up an external process
break set/show/clear the breakpoint
confreg configuration register utility
cont continue executing a downloaded image
context display the context of a loaded image
cookie display contents of cookie PROM in hex
dev list the device table
dir list files in file system
dis display instruction stream
dnld serial download a program module
frame print out a selected stack frame
help monitor builtin command help
history monitor command history
meminfo main memory information
repeat repeat a monitor command
reset system reset
set display the monitor variables
stack produce a stack trace
sync write monitor environment to NVRAM
sysret print out info from last system return
tftpdnld tftp image download
unalias unset an alias
unset unset a monitor variable
xmodem x/ymodem image download
rommon 2 > tftpdnld
Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.
usage: tftpdnld [-r]
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: “VARIABLE_NAME=value” and use “set” to show current variables.)
“ctrl-c” or “break” stops the transfer before flash erase begins.
The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch
The following variables are OPTIONAL:
TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7)
TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
Command line options:
-r: do not write flash, load to DRAM only and launch image
Neste ponto entre com as informações necessárias para a recuperação de seu IOS
rommon 3 > IP_ADDRESS=10.55.0.200
rommon 4 > IP_SUBNET_MASK=255.255.255.0
rommon 5 > DEFAULT_GATEWAY=10.55.0.254
rommon 6 > TFTP_SERVER=10.55.0.221
rommon 7 > TFTP_FILE=C2600-Advsecurityk9-Mz.123-5a.bin
Digite novamente o comando e espere uns 15 minutos…
rommon 8 > tftpdnld
IP_ADDRESS: 10.55.0.200
IP_SUBNET_MASK: 255.255.255.0
DEFAULT_GATEWAY: 10.55.0.254
TFTP_SERVER: 10.55.0.221
TFTP_FILE: C2600-Advsecurityk9-Mz.123-5a.bin
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
Receiving C2600-Advsecurityk9-Mz.123-5a.bin from 10.55.0.221
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file C2600-Advsecurityk9-Mz.123-5a.bin to flash.
Erasing flash at 0×60fc0000
program flash location 0×60b00000
rommon 9 > reset
Espere mais um pouquinho….
router#sh version
Cisco Internetwork Operating System Software
IOS ™ C2600 Software (C2600-ADVSECURITYK9-M), Version 12.3(5a), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Tue 25-Nov-03 06:00 by kellythw
Image text-base: 0×80008098, data-base: 0×812A1560
ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Router uptime is 1 minute
System returned to ROM by reload
System image file is “flash:C2600-Advsecurityk9-Mz.123-5a.bin”
Prontinho seu roteador está operacional novamente…
Abraços e até a próxima
Marcos Pitanga
Leia também:
- 3 - Perguntas Básicas, Respostas Básicas - GERENCIAMENTO DE REDE
- IP subnet-zero no exame CCNA
- Ativando SSH em Roteadores Cisco
- Comandos não-documentados do Cisco IOS
- Warm Reload
- Configuração de VLANs e VTP SEM usar o VLAN Database mode, no Dynamips
- Auto-Segurança em roteadores Cisco
- Implementando Pequenas Redes com Cisco
- Comprimindo o startup-config
- Cisco IOS IP SLA tool

Posts
17 de June de 2008 às 9:44 am
Excelente Post…
Aproveitando o assunto, possuo um 805 que, de repente, a serial0 dele desapareceu. Isso estaria relacionado ao IOS corrompido ou ao hardware mesmo?
Valeu.
17 de June de 2008 às 12:04 pm
Excelente post sr. Pitanga, consegui este processo também através do X-modem no router e X-modem pelo Hyperterminal, é um opcional mais lento mas também funciona perfeitamente, aconselho a mudar o register do router para que a velocidade da console fique em 115200 bps, quando terminar a cópia o router irá reiniciar com o ios apenas na ram, sendo necessário salva-lo na flash, através de um copy tftp flash ágora através do próprio ios carregado na ram, embora mais trabalhoso e demorado, também funciona.
Este assunto deveria ser cobrado no CCNA!
17 de June de 2008 às 12:27 pm
Plinio, muito estranho.
Experimente trocar seu IOS.
http://files.studioworks.ru/files/cisco/IOS/
17 de June de 2008 às 5:27 pm
Nice
20 de June de 2008 às 8:13 am
Muito bom… vlw a dica!!!