So you are working on your shiny Cisco Nexus 7000 switch with a few virtual device contexts configured. And then you need to change between contexts that you have created, you use this CLI:
N7K-1(config)# switchto vdc
I know. Annoying right!!
What’s makes this piece of CLI annoying is the overlap with
N7K-1(config)# int eth 1/1
command. One of the most common commands on a Nexus, which, you might remember is a very big switch, is the, wait for it, switchport command. And Ethernet ports, of which there are lots and lots in a Nexus 7000 – it’s called a switch, right, use the switchport command all the time.
And, for anyone who has spent several years working on other Cisco devices with Virtual Device Contexts, it also goes against the flow:
|ASA (Firewall with multiple contexts)||
|ACE (Application Control Engine – Load Balancer)||
|Nexus / NXOS||
Why is this so pointlessly different and hateful to customers ?
Temporary Workaround using Aliases
Of course, you can make a workaround using the alias command.
N7K-1(config)# cli alias name changeto switchto vdc
and then you can do this
N7K-1# changeto MGT
This is common practice for all Network Engineers to be the first thing to fix inside NXOS.
The EtherealMind View
Some contacts at Cisco tell me that this command was part of the SAN-OS syntax, and therefore was not changed during the transition to NX-OS.
switchto command overlaps one of the most commonly used commands –
switchport. Thus, you have the switchto command, used perhaps one in a thousand times, overlapping with the most common command in a large switch.
And given that the ACE and FWSM set this syntax in place three to five years ago, I do not understand why NXOS should use something different. And because the overlap with the
switchport command is so egregious, NXOS should update to the modern era and use changeto syntax.
Ok. I feel better now, got that off my chest. Merry Christmas.
Other Posts in A Series On The Same Topic
- Cisco IOS CLI Regex: sh ip bgp in (2nd May 2012)
- IOS CLI Tip: More accurate pipe commands (1st May 2012)
- Cisco Nexus NXOS and Fixing broken “switchto” syntax with alias (18th December 2011)
- show ip eigrp topology all (22nd May 2011)
- Cisco IOS CLI Shortcuts (6th February 2011)
- The poor man's IOS Traffic Generator (19th September 2009)
- IOS: "terminal monitor" on, off - logging to your terminal (17th September 2009)
- IOS: Console, Terminal, Monitor, VTY - what is what ? (16th September 2009)
- IOS: Clearing an interface configuration (13th September 2009)
- IOS: Setting Terminal Window Length (10th September 2009)
- IOS CLI: show run linenum (9th September 2009)
- IOS: Setting the TCP timeout on IOS (14th August 2008)
- IOS: enable and .... disable ? (20th July 2008)
- IOS: Reverse SSH console access - Part 2 (25th June 2008)
- IOS:Open Source Lab DNS and IP addressing (2nd June 2008)
- IOS: Reverse SSH console access (29th May 2008)
- ip tcp timestamp (14th April 2008)
- Cisco ASA and IOS command tip - test aaa-server (18th February 2008)