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
| Question | Command |
|---|---|
| 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 |
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. show ip interface brief: Gi0/0 and Gi0/1 are up/up; Gi0/2 has its line protocol down.
- 2. show cdp neighbors: SW1 is listed on Gi0/1; no neighbour is listed on Gi0/2.
- 3. show ip route: the default route points out Gi0/0 toward the ISP.
Reading interface status, neighbours and routes
All output on this page is based on Cisco documentation, not run on a lab device.
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
shutdown command.| Status / Protocol | Meaning | Look at |
|---|---|---|
| up / up | Physical link and line protocol are up | VLANs, addresses, routes and policy if traffic still fails |
| down / down | No physical link | Cable, the device at the other end, speed settings |
| up / down | Link but Layer 2 fails | Encapsulation, keepalives, the far end's config |
| administratively down / down | Shut down by an admin | no 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.
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
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
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:
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
show ip interface brief shows an interface as 'administratively down / down'. What fixes it?
Which command tells you the port number on the switch at the other end of a cable?
Gi0/1 is up/up, but a PC beyond R1 cannot reach a server. What has this output established?
Cisco references
- Troubleshooting high CPU utilisation: diagnostic commands can consume CPU time.
- Configuring Cisco Discovery Protocol: checking global and interface CDP state.
- Configuring 802.1Q trunking: reading the trunk VLAN lists.