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 the series
- Cisco IOS CLI Regex: sh ip bgp in
- IOS CLI Tip: More accurate pipe commands
- Cisco Nexus NXOS and Fixing broken “switchto” syntax with alias
- show ip eigrp topology all
- Cisco IOS CLI Shortcuts
- The poor man's IOS Traffic Generator
- IOS: "terminal monitor" on, off - logging to your terminal
- IOS: Console, Terminal, Monitor, VTY - what is what ?
- IOS: Clearing an interface configuration
- IOS: Setting Terminal Window Length
- IOS CLI: show run linenum
- IOS: Setting the TCP timeout on IOS
- IOS: enable and .... disable ?
- IOS: Reverse SSH console access - Part 2
- IOS:Open Source Lab DNS and IP addressing
- IOS: Reverse SSH console access
- ip tcp timestamp
- Cisco ASA and IOS command tip - test aaa-server