Solved

Cisco 2600 Router Wipe All Config

Posted on 2010-09-17
6
1,071 Views
Last Modified: 2012-05-10
Basically I am connected via telnet to a remote cisco 2600 router, I do not think this is possible but thought I would ask.

I want to remove all the config besides the IP address on FE0/0 (I am currently connected through that interface).

I do not want to go through each line with the no ip route 0.0.0.0 0.0.0.0 style of command.

0
Comment
Question by:souldigital
6 Comments
 
LVL 3

Accepted Solution

by:
kf4zmt earned 500 total points
ID: 33704704
The only thing I can think of is to edit an offline copy of the config in a text editor to remove all the configuration you want.  Then, tftp it directly to the startup config - (copy tftp start) and then reboot the router.

This is risky though.  If you make a mistake in the edited startup config, you'll might cut yourself off from the router.  USE WITH CAUTION!
0
 
LVL 17

Expert Comment

by:Kvistofta
ID: 33704713
Create a small text file containing only the config yiou want. Upload it with copy tftp startup, and reload.
Kvistofta
0
 

Expert Comment

by:Gelom
ID: 33705244
I think this fits the sequence of commands

erase startup-config
reload
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 3

Expert Comment

by:rgeers
ID: 33705663
never do a reload if you want to make shure to keep a single setting. You dont know if the reload works, someone might have booted the router manually from the boot monitor prompt, and then a reload will throw you in the boot monitor. Your best option is actually negating all the commands, as you suggested you didnt want to do. This can be ran from your console and edited offline. Then you just paste it in your CLI
0
 
LVL 2

Expert Comment

by:luathas
ID: 33706093
If the majority of configurations that you are wanting to remove are contained under interfaces then you can also try using the "default" command to reset an interface to it's default settings (generally no IP address, shutdown interface, etc.). It has been awhile, but going this method I don't believe it will erase sub-interfaces and those would first need to be removed with a no interface statement. e.g.:

Interface Serial 0

Interface Serial 0.1

For making an instant global change it sounds like the tftp option is your best bet. Unless you have a console cable plugged directly into the router do not use the "erase startup-config" and reload as this will force the router after booting up to start the initial setup and you will loss your telnet connection because all interfaces at that point would have no IPs and be shutdown.
0
 
LVL 10

Expert Comment

by:koudry
ID: 33706850
There are a number of options:

(1) If you just want to clear the config on the interfaces (Cisco 2600 does not have many of them), you can just issue the global config command "default interface ", e.g. "default interface f0/0" will clear all the config on interface f0/0.  This should remove the config on that interface and return the interface back to default settings.

(2) if you want to get rid of all your config and replace it with a new one, you can do what someone has already suggested, i.e.:

- erase start   (making sure you have a backup, e.g. "copy start flash:backup-start" or take a copy off the router)
- reload  (say no to save config)

When the router comes back (hopefully), you will have a clean sheet to work with and you can do whatever you like from there.

Now if you have a fresh config to put on the router, you can put it in a note pad and FTP/TFTP to the router, making sure that your new config is pointing to the correct IOS on the router. You need to set the basic FTP / TFTP commands on the router to let you do that FTP or TFTP, e.g. in the global config mode:

- ip tftp source  for example "ip tftp source-interface f0/0" making sure that f0/0 is the interface attached to the ftp or tftp server.

Then in the exec mode, you can do copy tftp: flash:   (and follow on-screen instructions)

So once your new config is on the flash card, you can copy it on the nvram as the new start config by doing:

copy flash:new-config-file start

So your new config becomes the starting config. Then you need to reload the router again so that the new config takes effect. Before you reload, make sure that the new start config, has the IOS you want by doing:

sh start | i boot system

This will show you the line in the config that points to the IOS image file to be loaded when the router starts.

There are some precautions to take:

- Avoid getting stuck in the rommon: when you reload a router (any router), there is always a chance the router may not return normally.  So it is always useful to have access to some materials on recovering the router.  Access to the Internet is a good safety net.

- Make sure you have a list of the IOS on the router to hand if you have to boot from the rommon

- Make sure you have the old config backed up off the router just in case

- Don't cut the tree on which you are sitting: if you are remotely working on the router and changing interface configuration, you may find yourself locked out.  

There should be enough information here to get you going. However, if this is not sufficient, please post back.

Thanks,

Koudry
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now