Diagnosing Problems · Topic 5 of 6
Basic Cisco Show Commands
Read Cisco IOS show commands such as show running-config, show ip interface brief, show ip route, show mac address-table and show interfaces status.
- 5 min
- Show commands only display information and do not change the configuration.
show ip interface briefgives a quick view of interface addresses and status.show interfaces statussummarises switch ports as connected, notconnect, disabled or err-disabled.
What it is
Show commands display information about a Cisco device without changing anything.
They are the main way to check a router or switch. You type a command, and the device prints the answer.
This page uses Cisco IOS and IOS XE syntax, as found on most Catalyst switches and ISR routers. Other platforms use similar commands with small differences.
How it works
Each command answers one question, and the output is read line by line.
The commands at a glance
| Command | What it shows |
|---|---|
show running-config | The configuration that is active now, often written show run |
show cdp neighbors | Directly connected Cisco devices and the ports that join them |
show ip interface brief | Each interface with its IP address and status |
show ip route | The routing table |
show version | Software version, uptime, model and memory |
show inventory | The device model and serial number, and its modules |
show switch | The members of a switch stack, on a stackable switch |
show mac address-table | The MAC addresses the switch has learned and their ports |
show interface | Detailed status and counters for all interfaces |
show interface x | The same detail for one interface, for example show interfaces GigabitEthernet0/1 |
show interfaces status | A one line summary of each switch port |
The word interfaces can also be typed in the singular, interface.
show ip interface brief
This is the quickest health check. Look at the Status and Protocol columns.
Switch# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 192.168.1.2 YES manual up up
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/2 unassigned YES unset down down
An interface that is up and up is working. A status of administratively down means someone turned the interface off with the shutdown command.
show interfaces status
This command lists switch ports on single lines.
Switch# show interfaces status
Port Name Status Vlan Duplex Speed Type
Gi0/1 connected 10 a-full a-1000 10/100/1000BaseTX
Gi0/2 notconnect 1 auto auto 10/100/1000BaseTX
The status is connected when a device is attached and the link works, and notconnect when no link is detected. A port that is disabled was shut down, and err-disabled means the switch turned it off after detecting a problem.
show ip route
The routing table lists each known network and how it was learned.
Router# show ip route
Gateway of last resort is 192.168.1.254 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.1.254
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
The sample is shortened. A real router also prints a legend of route codes at the top.
The code C marks a connected network, L the router's own address, and S a static route. The star on S* marks the default route, and the gateway of last resort is its next hop.
show mac address-table
Switch# show mac address-table
Vlan Mac Address Type Ports
---- ----------- -------- -----
10 0050.7966.6800 DYNAMIC Gi0/1
It shows which port each learned MAC address was found on, and the VLAN. Use it to find where a device is plugged in.
Other commands
show running-config prints the active configuration. The saved copy is the startup configuration, and changes are lost at reload unless they are saved.
show cdp neighbors lists neighbours with their device ID, local port, platform and the neighbour's port. It helps you map the cabling.
show version shows the IOS version, how long the device has been running, and the model. show inventory lists parts and serial numbers, which are useful for support and replacement. show switch shows the members and their roles when switches are stacked.
show interfaces GigabitEthernet0/1 starts with a line such as GigabitEthernet0/1 is up, line protocol is up, followed by speed, duplex and error counters.
What to remember for the exam
Seven facts cover most questions on this topic.
- Show commands only display information and do not change the configuration.
show ip interface briefgives a quick view of interface addresses and status.show interfaces statussummarises switch ports as connected, notconnect, disabled or err-disabled.show ip routelists the routing table.Cis connected,Lis local andSis static.show mac address-tableshows learned MAC addresses and the port for each.show cdp neighborsshows directly connected Cisco devices.show versionshows the software version and uptime, andshow inventoryshows parts and serial numbers.
Start with show ip interface brief or show interfaces status. A quick look often finds a down port.
Common mistakes
These four errors appear again and again.
Mixing up status and protocol. An interface needs both to be up.
Forgetting the saved configuration. show run shows the running copy, which is lost at a reload if unsaved.
Reading administratively down as a cable fault. The interface was turned off by an administrator.
Running the commands on the wrong platform. These are IOS and IOS XE forms.
Show commands are safe to run, but the output can show passwords or network details. Handle it with care.
Check yourself
Work through these three questions.
Which command gives a quick list of interfaces with their IP addresses and status?
The
show ip interface briefcommand does this.What does the code S* mean in
show ip route?It marks a static route that is the default route.
Which command shows where a device is plugged into a switch?
The
show mac address-tablecommand shows the port on which a MAC address was learned.
Topic 5 of 6 in Diagnosing Problems
Test yourself on Diagnosing Problems
The full Cisco CCST 100-150 Networking question bank has 749 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.