Solved

Cisco 2600 Router Wipe All Config

Posted on 2010-09-17
6
1,086 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Logging into A Cisco switch from another switch or router 2 59
Site to Site VPN DNS issue 6 40
CTIOS error on Windows 10 3 62
BGP max path 2 1 18
There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
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…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

734 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