Important Cisco Chow Commands
Important Cisco Chow Commands
Important Cisco Chow Commands
If you are a networking professional that is operating and supporting Cisco devices and
networks, then learning some important “show commands” is essential.
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).
Router#
Switch#
To get into “Privileged EXEC” mode, connect to the device (e.g via console, SSH, Telnet) and
use the enable command:
Router> enable
Router#
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 .
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.
write mem or wr
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
Uptime for this control processor is 2 weeks, 22 hours, 51 minutes
System returned to ROM by Power Failure or Unknown at 18:56:54 BST Fri Jul 10 2020
System restarted at 16:59:45 UTC Tue Dec 15 2020
System image file is "flash:packages.conf"
Last reload reason: Power Failure or Unknown
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.
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.
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 datacentre 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.
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.
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.
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.
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.
Output drops are caused by QOS buffers overflowing and would suggest that the interface is
congested.
Input and output rates will increase if traffic is passing over the interface.
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.
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.
Description:
This command is similar to above except this shows any interfaces that have IP version 6
addresses configured on them.
Description:
By default, the Cisco Discovery Protocol (CDP) is enabled on all Cisco devices but for security
this protocol is sometimes manually disabled.
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.
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.
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.
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
show logging | begin Dec 24
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.
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.
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 neighbors
Description:
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.
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.
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.
R1#show standby
Link connecting the active Router to the standby Router for Standby group 1.
Ethernet0/0 - Group 1
Active state means HSRP is ready to fail over should the primary router fail.
State is Active
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
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac0 1 (v1 default)
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
Next hello sent in 1.680 secs
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 configured Priority of the router, the highest priority makes the router the Active
router.
Priority 200 (configured 200 )
Group name is "hsrp-Et0/0-1" (default)
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.
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 processes
Description:
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%.
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.
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.
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.
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.
VTP Version – 1 or 2
Configuration revision – A higher revision will take priority over a lower revision.
Maximum supported Vlans – 1005
VTP Operating Mode – Client, Server or Transparent.
VTP Domain – All switches configured with the same domain name will sync databases.
VTP Pruning Mode – Enabled or disabled
VTP V2 Mode – Enabled or disabled
VTP Traps generation – Enabled or disabled
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.
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.
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.
Name: Gi1/0/33
Switchport: Enabled – The Interface is a switching interface or a routed port
Administrative Mode: static access – The port type is access, trunk or disabled
Operational Mode: static access – The port is up or down
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off – Interface will not automatically negotiate as a trunk
Access Mode VLAN: 50 (VLAN_OFFICE) – What Vlan the interface is in
Trunking Native Mode VLAN: 1 (default) – native Vlan if configured as a Trunk port.
Administrative Native VLAN tagging: disabled
Voice VLAN: none – What vlan has been configured for Cisco IP Phone, if any.
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none – If the interface is a part of a private Vlan
Trunking VLANs Enabled: ALL – Which vlans are allowed if configured as a Trunk port
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
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.