Show Commands for Troubleshooting
Lab Objectives
- Use the core IOS "show" commands to inspect device configuration, interface state, routing table, and system information.
- Learn how to use pipe filters to focus output when troubleshooting.
- Apply show-command verification to locate and resolve a simple connectivity problem in the lab topology.
Lab Tasks (Try It Yourself First!)
Complete these tasks WITHOUT looking at the solution below. Use
?andshowcommands to figure it out.
Task 1: Inspect running configuration on R1 and R2
Find the IP addresses configured on router interfaces for R1 and R2 by examining the running configuration. Record the configured IP on:
- R1 GigabitEthernet0/0, Gi0/1, Gi0/2
- R2 GigabitEthernet0/0, Gi0/1
Do not change any configuration yet — only read it.
Task 2: Check interface state and counters
On R2, examine the operational state and error counters for the interface connected to the switch (Gi0/1). Confirm the interface is up and there are no CRC or input errors.
Task 3: Verify routing and system info, use pipe filters
- On R1, confirm the directly connected routes and that the 10.10.10.0/24, 10.10.20.0/24 and 10.10.30.0/24 networks appear in the routing table.
- Use
show versionto capture the IOS image name and uptime. - Demonstrate use of a pipe filter to quickly extract the IOS image line from
show version.
Think About It: When you inspect a router with show ip route, why are directly connected networks listed differently from learned routes (for example, why they appear as “connected” instead of a routing protocol entry)? What practical difference does that make during troubleshooting?
Lab Solution
ASCII Topology (use this exact topology; router interface IPs shown)
[Internet]
203.0.113.1
|
R1 (Gateway)
Gi0/0: 10.10.10.1
Gi0/1: 10.10.20.1
Gi0/2: 10.10.30.1
/ | \
R2 R3 R4
Gi0/0: 10.10.10.2 | Gi0/0: 10.10.30.2
Gi0/1: 10.10.40.1 |
/ \ |
S1 S2 S3
/ \ | /
PC1 PC2 PC3 PC4 PC5
Note: VLAN subnets used by switches/PCs:
- VLAN 10 (Sales) 192.168.1.0/24
- VLAN 20 (Engineering) 192.168.2.0/24
- VLAN 30 (Management) 192.168.3.0/24
Task 1 Solution: Inspect running configuration on R1 and R2
What we are doing: We read the running configuration to confirm interface IPs. The running config is the active configuration in RAM; this is the authoritative place to see what the router is currently using.
R1# show running-config
What this command does:
show running-configdisplays the entire active configuration. This matters because it reveals interface IP addresses, routing protocol statements, static routes, and any ACLs—everything currently in use.
Why it matters:
- When troubleshooting reachability, the first thing to confirm is that the device has the correct IP addresses and no accidental typos exist in the interfaces.
Verify (expected excerpt):
R1# show running-config
!
version 15.2
hostname R1
!
interface GigabitEthernet0/0
ip address 10.10.10.1 255.255.255.0
!
interface GigabitEthernet0/1
ip address 10.10.20.1 255.255.255.0
!
interface GigabitEthernet0/2
ip address 10.10.30.1 255.255.255.0
!
end
Repeat on R2:
R2# show running-config
Explanation & why:
- Running the same on R2 confirms that R2 Gi0/0 and Gi0/1 have the expected addresses for the 10.10.10.0/24 and 10.10.40.0/24 networks.
Verify (expected excerpt):
R2# show running-config
!
hostname R2
!
interface GigabitEthernet0/0
ip address 10.10.10.2 255.255.255.0
!
interface GigabitEthernet0/1
ip address 10.10.40.1 255.255.255.0
!
end
Tip: If the running-config is very long, use pipe filters (shown in Task 3) to reduce output to just the interface you need.
Task 2 Solution: Check interface state and counters
What we are doing: We inspect the physical and logical state and error counters of R2 Gi0/1 to ensure it is operational and not experiencing errors.
Commands:
R2# show interfaces GigabitEthernet0/1
What this command does:
show interfaces <interface>provides detailed status (up/down), bandwidth/duplex, packet counters, and error counters. This matters because many connectivity problems are caused by physical layer issues or duplex/speed mismatches.
Why it matters:
- A correctly configured IP address is necessary but not sufficient; the interface must be operational and error-free.
Verify (expected excerpt):
R2# show interfaces GigabitEthernet0/1
GigabitEthernet0/1 is up, line protocol is up
Hardware is Gigabit Ethernet, address is 0001.0001.0001 (bia 0001.0001.0001)
Internet address is 10.10.40.1/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 0 interface resets
Interpretation:
- The interface is up/up, full-duplex, 1 Gbps, and there are zero input errors/CRC. If you saw CRC or collisions, that would indicate a cabling, duplex, or physical problem.
Task 3 Solution: Verify routing, show version, and use pipe filters
What we are doing: Confirm the routing table on R1 lists the directly connected networks and show system information (IOS image and uptime). Then demonstrate a pipe to extract the image line.
Commands and explanation:
R1# show ip route
show ip routedisplays the IPv4 routing table. This tells you which networks are reachable and how they are known (connected, static, or via a routing protocol).
Verify (expected excerpt):
R1# show ip route
Codes: C - connected, S - static, R - RIP, O - OSPF, B - BGP
Gateway of last resort is not set
C 10.10.10.0/24 is directly connected, GigabitEthernet0/0
C 10.10.20.0/24 is directly connected, GigabitEthernet0/1
C 10.10.30.0/24 is directly connected, GigabitEthernet0/2
Why this matters:
- Connected routes must be present for the router to forward traffic to those networks. If they're missing, the interface may be administratively down or misconfigured.
Show system version and image:
R1# show version
show versionprints platform, IOS image, memory, uptime, and other system facts — crucial when verifying the device is running the expected image and to gather hardware/software info during troubleshooting.
Verify (expected excerpt):
R1# show version
Cisco IOS Software, IOS-XE Software, Version 15.2(4)M
Technical Support: http://www.cisco.com/techsupport
ROM: System Bootstrap, Version 15.0(1r)M
R1 uptime is 2 days, 3 hours, 22 minutes
System returned to ROM by power-on
cisco ISR4451 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.2(4)M, RELEASE SOFTWARE
...
System image file is "bootflash:isr4300-universalk9.15.2.4.SPA.bin"
Using a pipe filter to extract the System image line:
R1# show version | include System image file
- The pipe (
|) withincludefilters output to lines matching the argument. This is useful in long outputs to find the exact detail quickly.
Verify (expected output):
R1# show version | include System image file
System image file is "bootflash:isr4300-universalk9.15.2.4.SPA.bin"
Real-world insight: In production,
show versionis one of the first commands support engineers will ask for; it provides the software and hardware context needed for defect and compatibility analysis.
Troubleshooting Scenario
Scenario: R2 interface to S1 is misconfigured
Symptom: Ping from PC1 (192.168.1.10) to PC3 (192.168.2.10) fails. R1 and R2 appear to have correct configurations at a glance.
Your task: Find and fix the issue so inter-VLAN traffic routes through R2 correctly.
Hint: Use show running-config and show interfaces — look for a mismatched IP on R2 Gi0/1.
Solution:
- Inspect R2 running-config and interfaces:
R2# show running-config | section interface GigabitEthernet0/1
R2# show interfaces GigabitEthernet0/1
- If you find the IP wrong (for example 10.10.40.2 instead of 10.10.40.1), correct it:
R2# configure terminal
R2(config)# interface GigabitEthernet0/1
R2(config-if)# ip address 10.10.40.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end
- Verify:
R2# show running-config interface GigabitEthernet0/1
R2# show interfaces GigabitEthernet0/1
Explanation:
- A wrong IP on R2 Gi0/1 prevents the switch network (10.10.40.0/24) from being reachable. Fixing the IP restores correct adjacency and connected route, allowing forwarding between VLAN subnets via the routers.
Verification Checklist
- Confirm interface IPs on R1 and R2 via
show running-config. - Interface R2 Gi0/1 is up with 0 errors (
show interfaces). - R1 routing table lists connected 10.10.10.0/24, 10.10.20.0/24, 10.10.30.0/24 (
show ip route). - Captured IOS image and uptime with
show versionand used pipe include to extract the image line.
Common Mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Interface shows administratively down | Interface was shutdown in config | Enter interface and no shutdown |
| Expected connected route not in routing table | IP address misconfigured or interface down | show running-config to verify IP, show interfaces to verify state; correct IP or bring up interface |
show version output too long to scan | Not using pipe filters | Use `show version |
| Seeing CRC/input errors on interface | Bad cable, speed/duplex mismatch | Re-seat cable, check switch port, force correct duplex if mismatch persists |
Challenge Task
Configure an ACL on R1 to prevent the 192.168.3.0/24 management VLAN from initiating TCP sessions to 192.168.1.0/24 while allowing all other traffic. Verify with show running-config and show access-lists. (No step-by-step guidance — use what you've learned about reading configs and pipe filters to locate the ACL and test connectivity.)