Link to home
Start Free TrialLog in
Avatar of TerrellITC
TerrellITC

asked on

Did I Wipe the Cisco Router's Configuration?

I pulled three Cisco routers out of storage to see if I could configure them for a new Point-to-Point T1. The routers had been configured for PtP before, but were put in storage after the remote offices moved back to the main office. (As detailed in another question, I've never worked with Cisco routers before as was looking forward to learning by doing...)

I found that they were password protected, so I started Cisco's password recovery procedure on one of the 1720s. <http://www.cisco.com/warp/public/474/pswdrec_1700.shtml>

I got to the part were I could see the running-config and the unencrypted password. I had a hunch that that was the encrypted password as well and also the password for the other two routers, so I powered off the router (I had read that this was a way of avoiding changes being permantly written.)

I connected to the other routers and found I was right about the passwords...

But when I went back to the first router, it prompted me to go into the initial configuration! At the Router# prompt, it looks like all the running-config is gone. Or is it?

Did I permanently loose the configuration info? Or is it still in memory in a place I'm not familiar with?
ASKER CERTIFIED SOLUTION
Avatar of Les Moore
Les Moore
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rshooper76
rshooper76

You probably just need to change the startup register back to it's original value.  Console to the router, follow step 5.  Once you into the router follow step 14 and reboot.
It sounds like you have done the first part right:

Reboot it, hit CTRL+BREAK,
at ROMMON, run:
rommon1> confreg 0x2142
rommon2> reset

Now the router will boot without reading it's config file.  This is where I believe you are.

Your next step is to log in, and enable.  Run this:
$ enable
# config term
# copy startup-config running-config
(config)# enable secret [newpassword]
(config)# config-register 0x2102
(config)# exit
# copy running-config startup-config
# reload

Since you are rebooting without config, there is no enable password, so we can now enable.  Next, we basically 'slam in' the old configuration, including the unknown password... however, we are enabled, so we can change that password, set it back to "read the config file on boot", then save the new password in the configuration and reboot.
Avatar of TerrellITC

ASKER

I don't believe that I did a "write mem", but perhaps the failures below may indicate that I did...

For rshooper76's solution, I get the following error:
  rommon 1 > config-register 0x2102
  monitor: command "config-register" not found

For Chireru's solution, I get the following error:
  Router>enable
  Router#config term
  Enter configuration commands, one per line.  End with CNTL/Z.
  Router(config)#copy startup-config running-config
                          ^
  % Invalid input detected at '^' marker.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well, it looks like I've learned how to reset a Cisco router to default. :-)

lrmoore is probably right that I did do a "write mem"--I don't specifically remember. But I was jumping between other tasks and reading the reference manual to learn more about what I was doing.

Unless there's any other advice, I'll divy up the points tomorrow.
You said the other routers had similar configs..  If they are untouched, you can transfer the configs between them.  

The best way is a TFTP server... cisco, aswell as other people offer a TFTP server.. just install it on your PC and fire it up.  Make sure you have a network connection between the router and your computer, then to save a config, run:
# copy running-config tftp
and answer the questions (server IP, filename)

Then, to put it on another router, make sure your connected to it, and run:
# copy tftp startup-config
(answer questions again)
# reload

The cheapo-easy way is to copy & paste the output of show running-config across, but that doesn't always work.
Thanks all for the help. Since lrmoore turned out to be right about me erasing the config, I awarded the answer to him, and spread points around for being so helpful. I sure learned a lot!
Thanks!
Cheers, mate!

<8-}