11-04-2016 06:29 AM - edited 03-03-2019 08:23 AM
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
11-04-2016 06:39 AM
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 :(
11-04-2016 07:57 AM
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.
11-04-2016 08:08 AM
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.
11-04-2016 09:49 AM
How about adjusting the width on the console or vty port?
!
line vty x (or line con 0)
width 512
!
Think that might work
11-04-2016 09:58 AM
I did try "terminal width 512" from exec level, and just tried "line vty x / width 512" but both of these did not work :(
11-07-2016 10:09 AM
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).
11-07-2016 11:34 PM
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.
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