February 9, 2025

Essential Cisco Command Aliases for Network Engineers

As a network engineer, efficiency and speed are key when troubleshooting and managing Cisco devices. Instead of typing long, repetitive commands, Cisco provides the ability to create aliases, which can save time and make daily operations more efficient.

In this post, I’ll share some clever and useful Cisco CLI aliases that you can configure on your switches and routers, including QoS and Data Center Bridging (DCB)-specific commands for those managing high-performance environments.

Why Use Cisco Aliases?

Aliases in Cisco devices allow you to create custom shortcuts for lengthy commands. This not only reduces typing errors but also enhances your troubleshooting speed. For example, instead of typing show processes cpu sorted, you can simply type p.

How to Create Aliases in Cisco CLI

Aliases are created using the following syntax:

alias exec [shortcut] [command]

For example, to create an alias h for show processes cpu history:

alias exec h show processes cpu history

Now, let’s dive into some useful aliases you can configure on your Cisco devices.


System Monitoring and Performance

These aliases help monitor CPU and memory usage effectively:

alias exec hc show processes cpu | include ^CPU  # View CPU utilization summary
alias exec hr show processes cpu history         # View CPU utilization history
alias exec p show processes cpu sorted           # View sorted CPU usage by process
alias exec pm show processes memory sorted       # View memory usage sorted by process
alias exec mu show memory statistics             # Display memory statistics

Interface and Connectivity Troubleshooting

Quickly check interface statuses, errors, and traffic drops:

alias exec up show ip interface brief | exclude unassigned  # Show active interfaces
alias exec down show interfaces | include (line protocol is (down|administratively down))  # Show down interfaces
alias exec err show interfaces | include errors  # Show interfaces with errors
alias exec drop show interfaces | include input|output drop  # Show interfaces with dropped packets
alias exec mac show mac address-table dynamic  # Show MAC address table
alias exec arp show ip arp | include  # View ARP table
alias exec nd show ipv6 neighbors  # Display IPv6 neighbors

Routing and Protocols

If you’re working with different routing protocols, these aliases will save you time:

alias exec routes show ip route  # Show IP routing table
alias exec bgp show ip bgp summary  # View BGP summary
alias exec ospf show ip ospf neighbor  # Show OSPF neighbors
alias exec eigrp show ip eigrp neighbors  # Show EIGRP neighbors
alias exec static show running-config | include ip route  # Show static routes

VLAN and Switching Commands

Essential aliases for working in a Layer 2 environment:

alias exec vl show vlan brief  # Show VLANs
alias exec vtr show vtp status  # Display VTP status
alias exec stp show spanning-tree summary  # Show spanning-tree summary
alias exec trunks show interfaces trunk  # Show trunk ports
alias exec port show interfaces switchport  # Show switchport information

QoS and Data Center Bridging (DCB) Aliases

For those managing QoS and DCB configurations, these aliases are invaluable:

alias exec qos show policy-map interface  # Show QoS policies on an interface
alias exec qstat show platform qos queue statistics  # Display QoS queue statistics
alias exec dcb show dcbx interface  # Show DCBX settings per interface
alias exec pfc show lldp neighbor detail | include PFC  # Verify Priority Flow Control (PFC)
alias exec qosmap show policy-map | include class-map  # Show QoS class-maps in use
alias exec dscp show mls qos maps dscp-output-q  # Show DSCP to queue mapping

Security and Access Control

Aliases to quickly check security settings:

alias exec acl show access-lists  # Show all ACLs
alias exec ssh show ip ssh  # View SSH settings
alias exec auth show authentication sessions  # Show active authentication sessions
alias exec lock clear line vty 0 4  # Clear all VTY sessions

Logging and Debugging

For troubleshooting and reviewing logs:

alias exec log show logging | last 20  # Show last 20 log entries
alias exec traps show snmp trap  # Display SNMP traps
alias exec deb debug ip packet detail  # Debug packet details
alias exec nod debug all  # Enable all debugging
alias exec undebug no debug all  # Disable all debugging

Shortcuts for Configuration and Reloads

alias exec wr write memory  # Save running configuration
alias exec save copy running-config startup-config  # Save config to NVRAM
alias exec reloadnow reload in 1  # Reload device in 1 minute
alias exec reboot reload in 5  # Reload device in 5 minutes
alias exec diff show archive config differences  # Show configuration changes

Final Thoughts

Using Cisco aliases can significantly enhance productivity by reducing the time spent typing long commands. Whether you’re monitoring system performance, troubleshooting network issues, configuring QoS/DCB, or managing security policies, these aliases will streamline your workflow.

If you have other clever Cisco aliases you use in your daily work, drop them in the comments below!