Routelearn.net
Course menu

Course 1: Cisco IOSLesson 2.1 (5 of 5 in this course)5 of 91 in the CCNA series

Cisco show commands

The show commands that answer most questions about interfaces, neighbours and routes.

Intermediate · 8 min read

Show commands are Cisco IOS commands that display the current state of a device, such as interface status, neighbours, VLANs and the routing table, without changing its configuration. Most are run from privileged EXEC mode.

In simple terms: They're how you ask a router or switch “what's going on right now?” They only read information, so they're safe to run at any time.

A real-life situation

You are connected to a router in a wiring closet you have never seen. There is no diagram. Within a minute you want to know: which ports are up, what is plugged into them, and where the router sends traffic. A handful of show commands answer all three.

What show commands are

On Cisco IOS, show commands display the current state of the device. They only read; they never change anything, so they are safe to run at any time. Run them from privileged EXEC mode (the # prompt).

QuestionCommand
Which interfaces are up, with which IPs?show ip interface brief
Speed, duplex, errors on one interface?show interfaces g0/1
Which Cisco devices are connected where?show cdp neighbors
Where does the router send traffic?show ip route
Which ports are in which VLAN? (switch)show vlan brief
Which links are trunks, carrying which VLANs? (switch)show interfaces trunk
Status, VLAN, speed of every switch port?show interfaces status
Gi0/1Gi1/0/24Gi0/2Gi1/0/24Gi0/0R1SW1SW2ISP
  1. 1. show ip interface brief: three interfaces up, with their addresses.
  2. 2. show cdp neighbors: SW1 and SW2 are connected, each on its port Gi1/0/24.
  3. 3. show ip route: the default route points out Gi0/0 toward the ISP.

Reading the output

All output on this page is based on Cisco documentation, not run on a lab device.

Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     198.51.100.2    YES NVRAM  up                    up
GigabitEthernet0/1     192.168.10.1    YES NVRAM  up                    up
GigabitEthernet0/2     192.168.20.1    YES NVRAM  up                    down
GigabitEthernet0/3     unassigned      YES NVRAM  administratively down down
Status is Layer 1 and Protocol is Layer 2. Gi0/2 is up/down: there is a signal but Layer 2 is not working (for example a keepalive or encapsulation problem). Gi0/3 is shut down on purpose with the shutdown command.
Status / ProtocolMeaningLook at
up / upWorkingHigher layers if there is still a problem
down / downNo physical linkCable, the device at the other end, speed settings
up / downLink but Layer 2 failsEncapsulation, keepalives, the far end's config
administratively down / downShut down by an adminno shutdown
Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
SW1              Gig 0/1           152             S I    C9200L-24 Gig 1/0/24
SW2              Gig 0/2           147             S I    C9200L-24 Gig 1/0/24
CDP (Cisco Discovery Protocol) tells you which Cisco device is on each port and which of its ports you are plugged into. If a neighbour is missing, the link may be down at Layer 1 or 2.
Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       O - OSPF, IA - OSPF inter area, * - candidate default

Gateway of last resort is 198.51.100.1 to network 0.0.0.0

S*    0.0.0.0/0 [1/0] via 198.51.100.1
      192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.10.0/24 is directly connected, GigabitEthernet0/1
L        192.168.10.1/32 is directly connected, GigabitEthernet0/1
      198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks
C        198.51.100.0/30 is directly connected, GigabitEthernet0/0
L        198.51.100.2/32 is directly connected, GigabitEthernet0/0
Notice that 192.168.20.0/24 is missing. Gi0/2 is up/down, and a connected route only appears when the interface is up/up.

Why filtering helps

Long output hides the line you need. Add a pipe to filter it: show running-config | section interface, show ip route | include 192.168.20 or show interfaces | include line protocol|errors. In configuration mode, put do in front to run a show command without leaving it.

Check yourself

Predict · scenario 1

show ip interface brief shows an interface as 'administratively down / down'. What fixes it?

Predict · scenario 2

Which command tells you the port number on the switch at the other end of a cable?

Predict · scenario 3

An interface is up/down. Why is its connected network missing from the routing table?