cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2674
Views
8
Helpful
8
Replies

Syntax help please to rem out some config

cyberpete
Level 1
Level 1

. ..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).

Peter@it-123.co.uk

8 Replies 8

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

peterledwidge
Level 1
Level 1

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

Thnaks fo rthe responses. Maybe I am asking too much of the IOS then. Thanks anyway.

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 process.

HTH

Rick

HTH

Rick

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)

peter@it-123.co.uk

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.

Very very cool. Thank you.

Good Solution.