Home > Networking Tips > Routing and Switching > Cisco IOS disaster recovery
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ROUTING AND SWITCHING

Cisco IOS disaster recovery


Brian Clark
01.14.2004
Rating: -4.53- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


After a bad IOS upgrade I had a router that wouldn't reboot. When running an enterprise network this is NOT what you need. So, calm down, take a deep breath -- it can be fixed!

Tools needed:
You will need a console cable, tftp server, and db9 serial adapter for the console cable.

  1. Connect to the router and you will see:
      rommon 1:gt;
    
  2. Set some variables for the router:
    The required variables are:
    IP_ADDRESS=
    IP_SUBNET_MASK=
    DEFAULT_GATEWAY=
    TFTP_SERVER=
    TFTP_FILE=

    Optional Variables are:
    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 to flash, load to DRAM only and launch image.

  3. Download your TFTP server to your PC. I use the 3Com 3CServer. A search on Google.com for 3Com TFTP server will return it as the first result. The filename is 3c117.zip. Install the program and start the TFTP server by opening the application. Place your IOS image in the TFTP server. It is best to use the backup IOS image if you have one. To find out where to place the IOS file you can click "Setup" in the 3CServer. I use C:IOS but anything will work as long as you place the IOS image in the directory.
  4. Set the IP address, subnet mask, default gateway, tftp server, and tftp file. For example:
    rommon 1> IP_ADDRESS=10.0.0.5
    rommon 2> IP_SUBNET_MASK=255.0.0.0
    rommon 3> DEFAULT_GATEWAY=10.0.0.1
    rommon 4> TFTP_SERVER=10.0.0.6
    rommon 5> TFTP_FILE=c827v-y6-mz.121-1
    
  5. The last step is to put it all together. Here I list the commands and the output from console. This step has my settings just simply replace these with your own. The "set" command will show you the set variables. Make sure the required variables are set and that your settings are correct. You can enter them again if there is an error. The tftpdnld command is the command used after the variables are set. This will download the IOS image and prompt you to erase flash and continue. Select "Y" or yes to continue. Once the image is downloaded it will copy the file to flash and erase the current flash. After erasing the flash the router will go into a programming cycle for the IOS image.
    rommon 6 > set
    PS1=rommon ! >
    TFTP_CHECKSUM=1
    ?=1
    IP_ADDRESS=69.33.177.100
    IP_SUBNET_MASK=255.255.255.0
    DEFAULT_GATEWAY=69.33.177.1
    TFTP_SERVER=69.33.177.20
    TFTP_FILE=c1700-y-mz.121-3
    rommon 8 > tftpdnld
    
              IP_ADDRESS: 69.33.177.100
          IP_SUBNET_MASK: 255.255.255.0
         DEFAULT_GATEWAY: 69.33.177.1
             TFTP_SERVER: 69.33.177.20
               TFTP_FILE: c1700-y-mz.121-3
    
    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 c1700-y-mz.121-3 from 69.33.177.20 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    File reception completed.
    Copying file c1700-y-mz.121-3 to flash.
    Erasing flash at 0x607e0000
    program flash location 0x602e0000
    
  6. You will need to do a cold restart for the router once this has been completed. The router will restart with the previous configuration and all should be well.

Remember to backup your IOS image and you startup configuration as well. If this type of issue ever arises again you will have a backup image to restore.

This tip was submitted to SearchNetworking.com by Brian Clark, Senior Network Engineer/CEO of Resiware, Inc.

Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Router and Switch Management
How many more users will 802.11n wireless access points support?
How to connect wireless networks for printing capabilities
How can I prevent collisions on my network?
How to upgrade an Input/Output Supervisor (IOS) router
Inter-VLAN routing with a LAN and WAN on a single router
Troubleshooting IP Routing -- 'CCNA Official Exam Certification Library, 3rd Edition,' Chapter 7
How can I load balance between DSLs and LLs?
How can I configure 10 VLANs with 5 unmanaged switches?
Cisco's ISR inches the company toward openness
How do I configure two leased lines in one router?

Routing and Switching
Routing with NAT traversal and UPnP
Secure Cisco routers against IOS flaw attack
Configure WAN protocols on a Layer 3 switch
How routers work
Network summarization -- Supernetting and wildcard masks
Routing: Five common, easily avoided errors
Router Expert: Building a WLAN proxy server, implementing ASR
Router Expert: Building a WLAN proxy server, implementing WPAD
Cisco IOS IP routing -- dynamic routing
Cisco IOS IP routing: Static routes

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
32-bit IP addressing  (SearchNetworking.com)
autotrunking  (SearchNetworking.com)
delay-tolerant network  (SearchNetworking.com)
Internet Routing in Space (IRIS)  (SearchNetworking.com)
logical router  (SearchNetworking.com)
routing table  (SearchNetworking.com)
subnet  (SearchNetworking.com)
subnet mask  (SearchNetworking.com)
virtual routing and forwarding  (SearchNetworking.com)
weighted fair queueing  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business
IT Management Solutions and Services Directory.
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersNetworking Product Trials
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts