CCIE Pursuit Blog

October 25, 2007

I Thought I Told You NOT To Do That!

Occasionally (okay, way more than occasionally) you will fat-finger something in your configuration.  Today I stumbled across something that I hadn’t tried before and experienced some interesting results.

I was mucking about with snmp settings and wanted to remove the snmp configuration:

r1(config)#do sh run | i snmp
snmp-server enable traps bgp state-changes all

I “up-arrowed” one time and added “no” to the beginning of the line.  I was trying to do “no snmp-server enable traps bgp state-changes all”.  I don’t know why I thought that I could up-arrow to the show output, but that another story.  :-)

r1(config)#no do sh run | i snmp
snmp-server enable traps bgp state-changes all

Interesting.  The router ignored the “no” and just executed the show command.  I’m surprised that I didn’t get a “^” and an error message.

This works with other show commands as well:

r1(config)#no do sh ip int br
Interface                  IP-Address      OK? Method Status                Prot
ocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down

Serial1/0                  10.1.1.1        YES NVRAM  up                    up

Serial1/1                  unassigned      YES NVRAM  administratively down down

“no no” is a…well, no-no:

r1(config)#no no do sh run int fa0/0
                               ^
% Invalid input detected at ‘^’ marker.

Random letters throw an error:

r1(config)#bb do sh run int fa0/0
                     ^
% Invalid input detected at ‘^’ marker.

This does not work when you are not in config mode: 

r1#no sh ip int br
      ^
% Invalid input detected at ‘^’ marker.

I guess that it makes sense for IOS to ignore “no” in config mode when the next word is “do”.  It’s a pretty safe bet that executing the show command was what the engineer really wanted to do, or the engineer fat-fingered the command.

2 Comments »

  1. I could just try this on a router i suppose, but I am curious as to why you have nodo without a space in the examples that work, but in all other examples you put a space in there.

    so it’s like “nodo” was the command as opposed to “no do”

    Comment by Anthony — October 26, 2007 @ 7:34 am | Reply

  2. @Anthony – Good catch. I was trying to bold the “no” and WordPress (or my own incompetence) deleted the space after the “no”. I went back and fixed this in the posting.

    Thank you.

    Comment by cciepursuit — October 26, 2007 @ 8:39 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 64 other followers