Course contents

Chapter 1: Cisco IOSLesson 9 of 10

Cisco show commands

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

Intermediate · 8 min read

Technical definition

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.

Seven commands, seven questions

On Cisco IOS, show commands display the current state of the device without changing its configuration. Start with focused commands: a large diagnostic collection such as show tech-support can use CPU time and produce sensitive configuration details. The examples below use privileged EXEC mode (the # prompt).

Seven show commands: quick reference
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
Diagram
Mapping an unknown closet with show commands
Mapping an unknown closet with show commands
Gi0/1Gi1/0/24Gi0/2Gi1/0/24Gi0/0R1SW1SW2ISP

Device key: R1 (router) · SW1, SW2 (switch) · ISP (network / service)

Lines show the example’s network connections. Thick links: uplinks/WAN, as labelled. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

  1. 1. show ip interface brief: Gi0/0 and Gi0/1 are up/up; Gi0/2 has its line protocol down.
  2. 2. show cdp neighbors: SW1 is listed on Gi0/1; no neighbour is listed on Gi0/2.
  3. 3. show ip route: the default route points out Gi0/0 toward the ISP.

Reading interface status, neighbours and routes

Diagram
An interface state answers a local question
An interface state answers a local question
An interface state answers a local questionAdministratively down/down indicates local shutdown. Down/down calls for checking the physical link, far end and platform-specific port conditions. Up/up indicates local physical and line protocol readiness, not end-to-end reachability.Admin PCSW1R1administratively down/downLocal shutdown is configured.Check the intended admin state.down/downInspect cable, optic and far end.Read interface / port details.up/upThe local link is operational.Still check VLANs, routes and policy.
Illustrative Ethernet interface states. Check detailed output and the platform guide; status words identify a starting point, not a complete diagnosis.

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 / upPhysical link and line protocol are upVLANs, addresses, routes and policy if traffic still fails
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

On most tickets this is the first command worth typing: one down interface can explain several symptoms at once, and it takes a second to rule out.

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
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, check the link and whether CDP is enabled on both ends. A device using only LLDP will not appear here. An empty CDP table alone does not prove that the cable has failed.
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.

Separate link status from reachability

up/up confirms the local interface state. It does not confirm the destination's subnet mask, a return route or an access control list. Follow the evidence in order:

Diagram
Follow the evidence before changing configuration
Follow the evidence before changing configuration
Follow the evidence before changing configurationInspect interface summary, then detailed counters, route selection, and the return path or policy. Each result narrows the next check; up/up and a forward route alone do not prove application reachability.1Interface stateshow ip interface briefFind the affected port.2Link qualityshow interfaces Gi0/1Inspect errors over time.3Route selectionshow ip route <host-ip>Check the selected next hop.4Other endReturn route · VLAN · ACLConfirm the full path.up/up ≠ end-to-end reachability
A troubleshooting sequence, not network cabling. Counters need comparison over time; a historical total alone does not show a current fault.

On a switch, show vlan brief checks VLANs and access-port membership. Use show interfaces trunk for trunk VLANs: the allowed list, the active list and the forwarding list answer different questions. A VLAN being allowed does not by itself mean the trunk is forwarding it.

Filtering long output with a pipe

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.

Test yourself on show commands

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

Gi0/1 is up/up, but a PC beyond R1 cannot reach a server. What has this output established?

Cisco references