06-06-2005 05:11 AM - edited 03-03-2019 09:44 AM
. ..could be dangerous (for me) if I get this wrong. I am running production 2600 router with IOS Version 12.0(7)XK1 and I just want to 'rem' out some static routes. Do I just prefix each line with an exclamation mark to render the line "invisible" to the processor?
i.e.
"! ip route 10.1.1.1. 255.0.0.0 172.16.1.1 200"
(I have seen use of the "REM" command but think it is not in this IOS revision and in any case is more related to ACL syntax)
The reason is I have about 15 floating statics routes that I want to not lose from the config - but render temporarily inactive : hence the need to "REM" them out somehow. Thanks in advance (yes is a simple question but easy to suffer a disproportionately adverse response if I get the syntax wrong).
06-06-2005 05:35 AM
Hello Peter,
you cannot put a description on a static route or REM it, if you want to get rid of it, use the syntax:
Router#conf t
Router(config)#no ip route 10.1.1.1. 255.0.0.0 172.16.1.1 200
HTH,
GP
06-06-2005 05:43 AM
First you should make a copy of the current configuration prior to any changes.
copy run start or wr mem
Do you know what each subnet in the static routes is for?
to remove a static route one at a time
config t
no ip route 10.1.1.1. 255.0.0.0 172.16.1.1 200
to reapply it to the configuration
config t
ip route 10.1.1.1. 255.0.0.0 172.16.1.1 200
Ensuring you have a saved config ensures you can roll back if you experience any problems.
HTH
06-06-2005 06:43 AM
Thnaks fo rthe responses. Maybe I am asking too much of the IOS then. Thanks anyway.
06-06-2005 07:23 AM
What you are asking to be able to REM a command is feasible and works in operating systems where the configuration file is really a file that gets read and implemented at run time. But the Cisco IOS running config is not a file but is a dynamic binary data structure. This is why it is not possible to add an ! to the command and make it invisible. In IOS the only way to make it not take effect is to remove it with the no
HTH
Rick
06-07-2005 02:42 AM
Rick - thanks yes that explains it. I try to do the least 'surgery' on production configs but clearly there is no substitute for cutting and pasting.
Cisco if you are reading this - can you develop a rem style function in the the ios? Thanks.(I am joking of course)
06-07-2005 07:59 AM
You can try to use parameter "administrative distance":
http://cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094195.shtml#topic2
...
** If the administrative distance is 255, the router does not believe the source of that route and does not install the route in its routing table...
command: ip route
In your case it will be:
ip route 10.1.1.1. 255.0.0.0 172.16.1.1 255
BR.
06-07-2005 11:05 AM
Very very cool. Thank you.
06-09-2005 12:41 AM
Good Solution.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide