Cisco IBNS 2.0 - Work Faster with Aliases for Show Commands (IOS and IOS-XE)

In this article, we take a look at some of the most important “show” commands used when implementing IBNS 2.0 for 802.1x and MAB authentication on Cisco switches, and how to configure Aliases for these commands to dramatically improve time spent on troubleshooting and verification.

Introduction

When implementing wired authentication on switch ports using 802.1x, MAB, profiling, etc., there are a lot of moving parts involved that you will need to verify over and over again until you’ve got it all down just the way you want it.

The bad part is that many of the “show” commands related to wired authentication and related features are pretty long and tedious to type, making using short Aliases to run these commands very attractive.

Another bonus feature of using Aliases is that you can use the same short alias for “show” commands that are written differently in IOS and IOS-XE, but the resulting output is pretty much the same. With aliases, you don’t have to wonder about which version of the command is used in which OS.

IOS Aliases for Show Commands

Typing out these show commands over and over again quickly becomes a hassle, so use the bolded lines below to create alias command to speed things up. The highlighted part is the only thing you need to type to trigger the show command following it. To trigger these alias command in global configuration mode, just add the usual "do" in front of the alias command to make it work.

Show dACL attached to an interface:
alias exec li show ip access-lists interface
Example:
Switch# li g1/0/1

Show authentication results on an interface (username(s) and VLAN/dACL/SGT assigned):
alias exec se show access-session interface
Example:
Switch# se g1/0/1 details

Show simple view of access-session states on all interfaces:
alias exec as show access-session
Example:
Switch# as

Show more detailed view of access-session states on all interfaces (depite "brief" keyword):
alias exec asb show access-session brief
Example:
Switch# asb

Show IP Device Tracking database IP-to-MAC-to-Port bindings:
alias exec dip show ip device tracking all
Example:
Switch# dip

Show Device Sensor cache (CDP/LLDP/DHCP data):
alias exec ds show device-sensor cache interface
Example:
Switch# ds g1/0/1

Show 802.1x settings on an interface (timers, retries etc.):
alias exec dot show dot1x interface
Example:
Switch# dot g1/0/1

Show Device Classifier data (local profiler running on switch, uses Device Sensor data):
alias exec dc show device classifier attached detail
Example:
Switch# dc


IOS-XE Aliases for Show Commands

Typing out these show commands over and over again quickly becomes a hassle, so use the bolded lines below to create alias command to speed things up. The highlighted part is the only thing you need to type to trigger the show command following it. To trigger these alias command in global configuration mode, just add the usual "do" in front of the alias command to make it work.

Show authentication results on an interface (username(s) and VLAN/dACL/SGT assigned):
alias exec se show access-session interface
Example:
Switch# se g1/0/1 details

Show simple view of access-session states on all interfaces:
alias exec as show access-session
Example:
Switch# as

Show more detailed view of access-session states on all interfaces (depite "brief" keyword):
alias exec asb show access-session brief
Example:
Switch# asb

Show IP Device Tracking database IP-to-MAC-to-Port bindings:
alias exec dip show device-tracking database
Example:
Switch# dip

Show Device Sensor cache (CDP/LLDP/DHCP data):
alias exec ds show device-sensor cache interface
Example:
Switch# ds g1/0/1

Show 802.1x settings on an interface (timers, retries etc.):
alias exec dot show dot1x interface
Example:
Switch# dot g1/0/1

Show Device Classifier data (local profiler running on switch, uses Device Sensor data):
alias exec dc show device classifier attached detail
Example:
Switch# dc

Author’s note: I used to have all of these Aliases and Show commands in each of my IBNS 2.0 IOS and IOS-XE Configuration articles, but now decided to move them to one separate article, which is the one you’re reading right now, due to having to do updates in so many places when new Aliases/Show commands were added.