cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1136
Views
0
Helpful
7
Replies

Unable to delete a configuration statement

achelminski
Level 1
Level 1

Hi,

While trying to find the maximum length of a policy-map name, I found out that policy-map can have very long name but also that the length of the entire typed line is limited to 253 characters. The characters you enter after are not taken into acocunt.

Finally have created this:

RNET-I13#sh run | inc GEN-PMAP-TEST
policy-map GEN-PMAP-TEST-LENGTH-abcdefghijklmnopqrstuvwxyzabcdefghij . . . klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm

The length of the entire line is 253 characters.

My problem is that I cannot remove this policy-map from the running config, because adding "no " (3 characters) to the entire command is more than 253 character limit and so the 3 last characters of the policy-map name are not entered. At the end, we get :

no policy-map GEN-PMAP-TEST-LENGTH-abcdefghijklmnopqrstuvwxyzabcdefghij . . . klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij

and so it removes a policy-map that do not exist as the 3 last characters are missing.

I've tried via telnet or SSH, no changes.

I've tried to copy a config file to the startup, it does not work neither.

I've tried to use an alias, but the alias fails as it cannot expand (too long)...

Have you an idea on how I can remove this config line ? Or perhaps how to increase temporaly the max entry size ??

My only chance is that the config is not saved so it will dissapear on next reboot, but I'd like to avoid a reload...

Thanks in advance !

Alexandre

7 Replies 7

achelminski
Level 1
Level 1

Some point I missed in my previous post,

terminal width 512

did not help and increasing the number of col in my terminal client neither :(

What if you temporarily shorten the hostname of the device to a single character, and then try the command?

Other than that try taking it out via SNMP.

Thanks for your ideas !

I've tested the hostname solution but unfortunatly it does not help as the entire command entered is still more than 253 bytes.

SNMP could be a solution, I'll check if I can test it easily.

How about adjusting the width on the console or vty port?

!

line vty x (or line con 0)

width 512

!

Think that might work

I did try "terminal width 512" from exec level, and just tried "line vty x / width 512" but both of these did not work :(

Were you able to get rid of the configuration?

SNMP is an option, and if you didn't save it instead of a reload, perhaps a "copy start run" might work. (I'd still do it off hours).

Nope, config is still there..

I have to try the SNMP solution asap.

The "copy start run" is unfortunatly in append mode and not in replace, so if a config statement is present in the running and not in the startup, it won't be suppressed from the running.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: