Now, a lot of what occurs in networking can be a bit daunting, at first, but none of it is really too difficult to grasp. Believe it or not, most of the technical stuff in networking is easy when compared to the truly hard-earned lessons. Indeed, in my experience, it's the little administrative nuances--best practices, design under sub-optimal conditions, documentation and the like--that are irregular and non-intuitive. Don't even get me started on Layer-8 issues.
Well, today, I learned one more thing to not do. Don't worry: this won't take long.
What does this command typically do in Cisco IOS?
Hostname# sh vlan id 100
I've always shortened so-called "show" commands down to 'sh', making this is a perfectly valid abbreviation of 'show vlan id 100'. In theory, this will show which ports are assigned to VLAN 100 and other, related information.
Now, if I'm in a hurry, it's not uncommon that I might type something like this when trying to show information for a given VLAN:
Hostname# sh vlan 100
At this point, of course, IOS simply yells at me for forgetting the 'id' keyword and tells me to try again. By itself, this doesn't present a problem; I quickly retype my command and move on.
Unfortunately for me, today, I managed to become something of an obscure statistic, stumbling upon a perfect set of conditions, and did this:
Hostname (config)# sh vlan 100
In global configuration mode, 'sh' is not an ambiguous keyword, making this a valid abbreviation. The only problem is that there are no 'show' commands in global config. Let's expand this:
Hostname (config)# shutdown vlan 100
That's right. That isn't a 'show' command anymore. In global config mode, that just became a 'shut' command, and my VLAN 100 interface--also my management interface, in this case--just became administratively shutdown.
Imagine my surprise when, suddenly, the switch stopped responding. "What the hell just happened?!" I demanded. No telnet; no ping responses; only CDP to keep me company.
It actually took me a few minutes, looking through my terminal's scrollback buffer, to realize what I had done. In my mind, the strong correlation between what I had typed and what I had intended to do was so strong that I actually could not see the "(config)" in my command prompt.
And the outcome? The switch was power-cycled by an on-site technican and its manageability restored.
Ah, but what have I learned? "Show" commands are best left as just that: s-h-o-w. I might go so far as to only type 'sho', but anything less only saves me from typing a single letter, which is not at all worth even the smallest possibility of inadvertently losing manageability of a remote switch, let alone the downtime it can create.