If you are a networking professional that is operating and supporting Cisco devices and networks, then learning some important “show commands” is essential. Show
There are a few different categories of commands on Cisco devices. There are commands that configure the device to perform a certain function and also there are commands that extract information from the device and the whole network in general. Cisco “show commands” belong to the second category above. They are crucial when troubleshooting problems in the network or for displaying useful and critical information from the router or switch. In this article I have created the following Cisco Show Commands Cheat Sheet with brief description of the most important and most useful commands you will need as a Cisco Network Professional (both for IOS Routers and Switches). You can download the commands as a PDF document at the end of this article as well. Important “Show Commands” for Cisco RoutersNote that most of the commands below work both for Routers and Switches as well. Also, all of the commands below must be run from the “Privileged EXEC” mode which is denoted with a pound sign (#) such as: Router# To get into “Privileged EXEC” mode, connect to the device (e.g via console, SSH, Telnet) and use the enable command: Router> enable Command: show running-configDescription: This command will output all of the current configuration that is running in RAM memory of the device to the user’s terminal one page at a time. Pressing the enter key displays one line at a time and pressing the space bar displays one whole page at a time. To see the whole output at once use the command terminal length 0 before entering the show running-config command. Any passwords or shared keys are usually encrypted and therefore not visible in the output, however it is possible to show the plain text output of shared keys for RADIUS servers or VPN connections in the running-configuration by using the command more system:running-config. Further Related Commands: terminal length 0 Command: show startup-configurationDescription: This command is the same as the above show running-configuration command except this will output the configuration that is stored in NVRAM. It is this configuration that is loaded into memory when the device is first booted. When changes are made to a device these changes are made to the running-configuration only and need to be written to memory before the changes are permanently made to the startup-configuration. This can be useful if a mistake is made in the running-configuration and you need to revert, you can either copy the startup-configuration back into running memory or you can pull the power and reload the device which will load the old configuration. Further Related Commands: copy running-configuration startup-configuration Command: show versionDescription: This command shows a lot of useful outputs and will show different information depending on the device, model etc. The first few lines show which version of IOS software the device is running. Cisco IOS XE Software, Version 16.09.05 The next part of the output shows how long the device has been online for and the reason for the last reload. This can be useful to understand the reason for an unexpected reboot as a power cut will show as power failure. ASW_CORE_SWITCH_1 uptime is 2 weeks, 22 hours, 49 minutes The next section shows the licence packages that are installed and in use. You can also see if Smart licensing is in use or if traditional right to use licensing is installed. Technology Package License Information: —————————————————————————— Technology-package Technology-package Current Type Next reboot —————————————————————————— lanbasek9 Smart License lanbasek9 None Subscription Smart License None Smart Licensing Status: REGISTERED/AUTHORIZED The next section details the amount of system memory the device has installed and the amount of DRAM or physical memory. You can also see how many physical interfaces the device has and of what type and also how many virtual interfaces are supported. cisco WS-C3650-12X48UQ (MIPS) processor (revision F0) with 832395K/6147K bytes of memory. The final section shows the physical mac address of the device, the model of the device and importantly the system serial number. This is essential if you need the serial number to raise a Cisco Support Case and the device is in a remote data-center or in a heavily populated rack where the underside of the device is not visible. The last part of this section is more important for layer 3 switches as this will show you if the switch is a part of a stack, how many switches make up the stack and what version of IOS each switch in the stack is running. Base Ethernet MAC Address : b4:f7:d7:e1:5d:00 Command: show ip routeDescription: The show ip route command displays the IPv4 routing table containing all of the routes which are known by the router. This output will display the gateway of last resort and any static routes that have been manually configured or any dynamic routes learned from a routing protocol. The letter in the left-hand column tells you how the route was learned by the routing table and there is a key for each letter listed at the top. For example, the letter D tells you that this particular route was learned by EIGRP which is a dynamic routing protocol. It is possible for the router to hold more than one Routing table, these are known as VRF’s (virtual routing and forwarding). You can display the routing table for each VRF by using the command show ip route vrf followed by the VRF number. If the routing table is particularly large you can just display the static routes or just the routes learned by a particular protocol. Further Related Commands: show ip route vrf 1 Command: show ipv6 routeDescription: This command shows a similar output to show ip route except the routes shown in this table are for IP version 6. Further Related Commands: show ipv6 route summary Command: show interfacesDescription: The output from this command shows statistics from every physical and logical interface and can be quite long as there is a lot of information to be displayed. GigabitEthernet1/0/6 is up, line protocol is up (connected) The above line shows the interface is physically connected and is Administratively up. If there is a cable plugged into the interface and it shows not connected the cable should be replaced. Line protocol that shows disabled means the interface is in a shutdown state and err-disabled shows a port security violation. Hardware is Gigabit Ethernet, address is c4f7.d5e1.3d06 (bia c4f7.d5e1.3d06) The above shows bandwidth of the interface and the txload / rxload shows how busy the interface is; 255/255 would show an interface that is running at maximum and is congested. Encapsulation ARPA, loopback not set If the above line shows half-duplex then this would signify a configuration problem with the duplex settings at one or both ends of the link. input flow-control is on, output flow-control is unsupported Output drops are caused by QOS buffers overflowing and would suggest that the interface is congested. Queueing strategy: Class-based queueing Input and output rates will increase if traffic is passing over the interface. 785945926 packets input, 126175928146 bytes, 0 no buffer Input errors, CRC errors should not increase if they do this would highlight a problem with the cabling which should be replaced. Use the clear counters command then wait 5 minutes and show interfaces again. If the counter increases replace the cable. Further Related Commands: clear counters Command: show interfaces gigabitEthernet 0/0Description: The output from this command is the same as show interfaces except it only shows the statistics of the stated interface. Further Related Commands: show interfaces TenGigabitEthernet 0/0 summary Command: show ip interface briefDescription: This command lists a condensed one line for each logical and physical interface. Each line displays the interface, configured IP address, link status up/down and Administrative status up/down. You can condense this further by just stating the output of one particular interface or Vlan SVI. Further Related Commands: show ip interface brief vlan 10 Command: show ipv6 interface briefDescription: This command is similar to above except this shows any interfaces that have IP version 6 addresses configured on them. Further Related Commands: show ipv6 interface brief vlan 10 Command: show cdp neighborsDescription: MORE READING: How to Configure Dynamic DDNS on Cisco Routers (DYNDNS) By default, the Cisco Discovery Protocol (CDP) is enabled on all Cisco devices but for security this protocol is sometimes manually disabled. The command cdp run will re-enable this protocol. Show cdp neighbors displays summary details about any directly connected cisco devices such as the device Hostname, which interface on the local switch its connected to, what the device is (Router/switch/phone…. ), the device model and finally which interface on the remote device this router is connected to. The command show cdp neighbors detail supplies further information such as the remote devices IP address, which is useful for remotely connecting to the device and the version of IOS that the device is running. Further Related Commands: show cdp neighbors detail Command: show clockDescription: This command simply shows the current time configured on the device in hours, minutes and seconds. It also shows the current time zone and date in the format – Wed Feb 11 2020 Further Related Commands: show clock detail Command: show ntp statusDescription: Network Time Protocol is used to automatically synchronize the devices internal clock with an NTP server. The NTP server can be another device such as the core switch or there are public NTP servers on the internet that can be used for time synchronization. The show ntp status command shows whether NTP is configured and synchronised and shows the stratum level. The stratum level shows how far away this device is from the reference clock and therefore how accurate the time is. A stratum level of 2 would be considered as a directly connected peer and the maximum stratum level is 16. Further Related Commands: show ntp associations Command: show Flash:Description: This command will list all of the files which are stored in NVRAM and how much space in bytes is left in flash memory for additional files to be added. This is the location where files such as the router IOS firmware can be found. There can be more than one flash file system on a Router, these can be listed using the command show file systems. Further Related Commands: show file systems Command: show historyDescription: The show history command lists all the previous commands that have been entered in the terminal window during the session. When the terminal session is closed the history is removed. Command: show loggingDescription: The show logging command lists the log messages that have been stored in the devices log file. The amount of information that is collected here depends on the logging level and the size of the configuration buffer that has been configured on the device. The logging levels are as follows:
A configured logging level of 5 would log all conditions with the number of 5 or lower so informational or debugging messages would not be logged. If the logs are large you can search for a specific date by adding the pipe | symbol and the include keyword as shown below. Further Related Commands: show logging | include Dec 24 Command: show protocolsDescription: This command lists all the interfaces and whether the line protocol is up or down. It also shows which protocol is in use on the device such as IP. The command show ip protocols is useful for showing which IP routing protocols are active on the router such as RIP, EIGRP or OSPF. Further Related Commands: show ip protocols Command: show usersDescription: This command shows which users are currently logged into the device and whether they are logged in remotely through a VTY line or directly connected through the console port. Further Related Commands: show users all Command: show access-listsDescription: The show access-lists command displays all Access Lists that have been configured on the device. It shows Standard IPv4 access lists first, followed by Extended IPv4 access lists and ending with IPv6 access lists. The output from specific access lists can be displayed by adding the access list name or number at the end of the show access-list command as shown below. Further Related Commands: show access-list SNMP_ACL Command: show ip dhcp bindingDescription: This command is applicable to switches or routers which are acting as DHCP servers for the network segment. When an IP address is leased by the device this leased address is placed into a DHCP bindings table which shows the mac address of the device that is tied to the leased IP address. The DHCP bindings table also shows when the lease is due to expire. A specific address binding can be displayed by adding the required ip address to the end of the show ip dhcp bindings command. If a device on the network has been manually configured with an IP address in the same subnet as the DHCP pool this can cause an address conflict. The command show ip dhcp conflict will show any conflicting IP addresses and show ip arp will show which mac addresses have been given the duplicate address. The show ip dhcp snooping command shows which interfaces are trusted or untrusted for communication to the DHCP server if dhcp snooping has been enabled on the switch or router. Further Related Commands: show ip dhcp binding 10.0.0.10 Command: show ip dhcp poolDescription: This command displays all of the different configured pools of IP address ranges that have been allocated for lease by the device for DHCP purposes. The statistics from each pool show how much of the pool has been utilized, the total number of available addresses in the pool, how many IP addresses have been leased, the next address that will be leased from the pool and finally the start and end IP addresses of the subnet range that is used in the DHCP pool. Command: show ip eigrp neighborsDescription: This command displays all router adjacencies that have been dynamically discovered by the Enhanced Interior Gateway Routing Protocol (EIGRP). The output table shows the IP address of the connected neighbouring Router, which interface on the local router the advertisements were received on and the time left on the hold timer of each neighbour. Command: show ip ospf neighborDescription: The output table displayed by this command shows neighbour Router adjacencies that have been discovered by the Open Shortest Path First protocol (OSPF). The table shows the ID of the neighbour which is usually a logical loopback address that is configured on each router. The priority of the Router, with the highest priority being assigned to the Designated Router (DR). The state of the relationship which should be Full, any other state would suggest that the connection between these neighbours has been disrupted and the process for forming adjacencies has been restarted. Next to this is the Router designation of DR, BDR (backup designated router) or DROTHER for all non-designated routers. The next column shows the Dead Time which is how long the Router will wait to receive a keep alive before declaring the connection is down. The next column is the Address field which shows the IP address of the interface to which this neighbor is directly connected and finally the interface field shows the interface on the local router where the neighbour adjacency has been formed. The command show ip ospf interface gi 1/0/1 is useful for troubleshooting mismatches between the hello, dead and wait timers. Further Related Commands: show ip ospf interface gi 1/0/1 Command: show ip nat translationsDescription: When a router is used to translate private IP address ranges to public IP addresses the command show ip nat translations is used to show which IP addresses are currently being translated by the router. Router# show ip nat translations Pro Inside global Inside local Outside local Outside global Total number of translations: 3 The above table shows that there are 3 private IP addresses that are currently being translated to the Public Internet routable IP address of 88.66.5.240. Further Related Commands: show ip nat statistics Command: show standbyDescription: This command is used to show the status of the Hot Standby Router Protocol (HSRP) where one Router is active and passing traffic and another is on standby ready to take over the forwarding of traffic should the active router fail. Below is the output from the show standby command. R1#show standby Link connecting the active Router to the standby Router for Standby group 1. The IP address that is shared between the two Routers. This is the gateway address that should be configured on the End Hosts. Virtual IP address is 10.1.1.100 Keep alives are sent every 3 seconds, if no hello packets are received in 10 seconds a state change occurs and the standby router takes over and becomes active. Hello time 3 sec, hold time 10 sec With pre-emption enabled should the primary router come back up HSRP will detect this and there will be another state change making the primary router active again. Preemption enabled The current router you are connected to is the Active router Active router is local The IP address of the Standby router Standby router is 10.1.1.2, priority 100 (expires in 10.320 sec) The configured Priority of the router, the highest priority makes the router the Active router. Priority 200 (configured 200) Often traffic is load balanced over both the primary and secondary routers by creating a second standby group 2 and giving opposite priorities than were given to group 1. This will make the standby router in group 1 the active router in group 2 and vice versa. MORE READING: HSRP Vs VRRP Vs GLBP Redundancy Protocols Further Related Commands: show standby brief Command: show tech-supportDescription: The show tech-support output is usually requested by Cisco Technical Assistance Center (TAC) when troubleshooting an issue with the device. The output is very long and should be output to a file where possible as copying and pasting from the screen can be difficult due to the amount of output. This can be done through the settings of the terminal program used to connect to the Router. The show tech-support command will display the output from many different Cisco show commands to gather the current configuration, version and model details and show the overall health of the Router. Command: show processesDescription: The show processes command lists all of the services that are currently performing tasks using the Router’s CPU. The output provides information such as the Process ID, the priority of the process, how long the service has been running for, how many times the process has been run and the name of the process. The output also shows the CPU utilization for the intervals of 5 seconds, one minute and 5 minutes. This output can be seen in more detail by running the command show processes cpu history which displays the CPU history as a graph. The history is also shown over the longer intervals of 60 seconds, 60 minutes and 72 hours. These outputs can be useful for troubleshooting intermittent performance problems as it will show any periods where the CPU has reached 100%. Further Related Commands: show processes cpu history Important “Show Commands” for Cisco SwitchesCommand: show mac address-tableDescription: This command lists all of the mac addresses that have been learned by the switch. It lists the Vlan associated to each mac address and the interface from which the mac address was learned. Multiple Mac addresses learned from the same interface would indicate that the interface is a trunk interface that is most likely connected to another switch. You can find a where a specific device is located by searching the mac address table with the last few digits of the devices mac address or you can find what mac address is on a specific interface. Further Related Commands: show mac address-table | include b34a Command: show spanning tree summaryDescription: The output from this command will show you information on the spanning tree protocol that is running on the switch. The output seen may be slightly different depending on the version of spanning tree protocol that is running on the switch. The output shown below is from a switch running Rapid Per Vlan Spanning Tree (RPVST). The output shows which version of spanning tree is running and whether options such as BPDU Guard have been globally enabled on the switch. The table shows the number of interfaces that are in a forwarding or blocking state for each vlan. For information on which ports are in a blocking state for each vlan use the command show spanning-tree detail Switch is in rapid-pvst mode Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ———————- ——– ——— ——– ———- ———- VLAN0010 0 0 0 23 23 VLAN0020 0 0 0 24 24 VLAN0030 0 0 0 23 23 VLAN0031 0 0 0 23 23 VLAN0040 0 0 0 23 23 VLAN0041 0 0 0 23 23 VLAN0050 0 0 0 24 24 VLAN0052 0 0 0 23 23 Name Blocking Listening Learning Forwarding STP Active ———————- ——– ——— ——– ———- ———- VLAN0053 0 0 0 23 23 VLAN0054 0 0 0 23 23 VLAN0062 0 0 0 24 24 VLAN0063 0 0 0 23 23 VLAN0065 0 0 0 26 26 VLAN0066 0 0 0 25 25 VLAN0069 0 0 0 24 24 VLAN0070 0 0 0 23 23 VLAN0073 0 0 0 1 1 VLAN0074 0 0 0 1 1 VLAN0100 0 0 0 23 23 VLAN0317 0 0 0 23 23 ———————- ——– ——— ——– ———- ———- 20 vlans 0 0 0 425 425 Further Related Commands: show spanning tree detail Command: show etherchannelDescription: The output from this command shows information on each link aggregation Channel-Group configured on the switch. The output from this command will show how many interfaces have been bundled to form the Etherchannel and what Etherchannel protocol is being used in each channel group such as LACP or PaGP. To troubleshoot Etherchannels use the command show etherchannel summary as this output details which interfaces have been bundled into a port-channel and will show any links within the Etherchannel that are in a suspended state. Further Related Commands: show etherchannel summary Command: show vlanDescription: This command shows the vlan database and all the Vlans that have been configured on the switch. The output table shows the Vlan number, the Vlan name, whether the Vlan is active and which interfaces are configured as an Access port in a particular Vlan. It is important to remember that a Vlan will not become active until at least one interface is in an up and connected state in that Vlan. Further Related Commands: show vlan summary Command: show vtp statusDescription: This command shows the status of the Vlan Trunking Protocol which is a method that switches use to sync their Vlan databases. The output from this command shows the following details: VTP Version – 1 or 2 By default, all devices are configured with VTP server mode enabled. In server mode the Switch will advertise any changes that are made to its Vlan database to all other switches that are configured with the same VTP domain. A Switch configured with VTP Client mode will listen for VTP server advertisements and make changes to its Vlan Database based on the received Advertisement. You cannot make changes to any Vlan such as adding or deleting Vlans on a switch that is configured as a VTP client. A Switch configured with VTP mode Transparent does not participate in VTP and as such will not make changes to its Vlan database if it receives VTP advertisements, but it will forward these advertisements to other connected switches. Command: show port-securityDescription: This command will display a table showing all the interfaces that have been configured to use port security. The table shows how many Mac Addresses are allowed on an interface before a violation occurs and what action will be taken in the event of a security violation. The actions that can be taken are shutdown the interface, restrict the interface by dropping traffic from the offending Mac address and restrict the interface by dropping traffic but also send an SNMP trap to advise that a violation has taken place. Command: show monitor session allDescription: This command shows which interfaces have been placed into monitor (SPAN) mode for the purpose of replicating packets from another interface or group of interfaces. A computer running packet capturing software such as Wireshark can be connected to the monitor port and capture the traffic that has been replicated for analysis. Further Related Commands: show monitor session remote Command: show interfaces statusDescription: This command is useful for quickly displaying the current status of all the interfaces on the switch. The output shows one line for each interface and displays the following information: Interface number – Gi1/0/1, Te2/0/1, Po1 etc Further Related Commands: show interface status err-disabled Command: show interfaces switchportDescription: The show interfaces switchport displays a lot of information about every physical interface on a switch. The size of the output will depend on how many physical interfaces the switch has. Name: Gi1/0/33 Command: show interfaces trunkDescription: The show interfaces trunk command lists all interfaces that are configured as a Trunk port and which Native vlan has been set for each Trunk. The command also lists which Vlans are allowed to travel over the trunk. This command is useful for trouble shooting trunking problems such as Native Vlan mismatches or for troubleshooting when certain traffic is not reaching the other side of the Trunk connection which could be caused by a Vlan being missed off of the allowed Vlan list for the Trunk. Download Cisco Commands Cheat Sheet as PDF HERE |