Skip to content

Verification and Troubleshooting

Cisco IOS supports piping output through filters to find specific information quickly.

  • section: Display configuration section matching a keyword
  • include: Show only lines containing a keyword
  • exclude: Hide lines containing a keyword
  • begin: Start output at the first line containing a keyword
  • grep: Pattern matching (Unix-style)
  • count: Count the number of lines in output
  • head: Display the first N lines
  • tail: Display the last N lines
Terminal window
# show running-config | section dhcp
# show running-config | include username
# show running-config | exclude !
# show ip route | begin Gateway
# show running-config | count

Display IOS version, uptime, hardware model, and configuration register:

Terminal window
# show version

Cisco Discovery Protocol (CDP) identifies directly connected Cisco devices:

Terminal window
# show cdp neighbors

For detailed neighbor information including IP addresses:

Terminal window
# show cdp neighbors detail

Display failed login attempts:

Terminal window
# show login failures

View specific configuration sections using pipe filters:

Terminal window
# show running-config | section dhcp
# show running-config | section router
# show running-config | section interface

Quick overview of all interfaces (status and IP addresses):

Terminal window
# show ip interface brief

Quick overview of all IPv6-enabled interfaces:

Terminal window
# show ipv6 interface brief

View detailed interface statistics and configuration:

Terminal window
# show interfaces
# show interfaces <interface>

Example:

Terminal window
# show interfaces gigabitEthernet 0/0

Display switchport mode and VLAN information:

Terminal window
# show interfaces <port> switchport

Administrative Mode values:

  • dynamic auto: Port attempts to form a trunk if the neighbor is set to trunk or desirable
  • dynamic desirable: Actively tries to negotiate trunk formation
  • trunk: Port is in permanent trunking mode
  • access: Port is in permanent access mode

Example:

Terminal window
# show interfaces fastEthernet 0/1 switchport

Display all trunk ports and their allowed VLANs:

Terminal window
# show interfaces trunk

View detailed STP information for a specific interface:

Terminal window
# show spanning-tree
# show spanning-tree interface <interface> detail

Example:

Terminal window
# show spanning-tree interface gigabitEthernet 0/1 detail

Display EtherChannel summary and member ports:

Terminal window
# show etherchannel summary

For detailed EtherChannel information:

Terminal window
# show etherchannel port-channel
Terminal window
# show vlan brief
# show vlan id <vlan_number>
Terminal window
# show mac address-table
# show mac address-table interface <interface>

Display the complete routing table:

Terminal window
# show ip route

Display only statically configured routes:

Terminal window
# show ip route static

Display directly connected networks:

Terminal window
# show ip route connected

Display the gateway of last resort:

Terminal window
# show ip route 0.0.0.0

Display NAT configuration:

Terminal window
# show ip nat

Display active NAT translation table:

Terminal window
# show ip nat translations

Display NAT statistics (hits, misses, pool usage):

Terminal window
# show ip nat statistics

Remove dynamic NAT entries:

Terminal window
# clear ip nat translation *

Display the EIGRP topology table (all learned routes):

Terminal window
# show ip eigrp topology

Verify EIGRP neighbor adjacencies:

Terminal window
# show ip eigrp neighbors

Key information displayed:

  • Neighbor IP address
  • Interface connected to neighbor
  • Hold time (how long until neighbor is declared dead)
  • Uptime
  • SRTT (Smooth Round Trip Time)
  • Queue count

Display interfaces participating in EIGRP:

Terminal window
# show ip eigrp interfaces

Confirm EIGRP configuration and parameters:

Terminal window
# show ip protocols

Display only EIGRP routes:

Terminal window
# show ip route eigrp

Quick overview of OSPF-enabled interfaces:

Terminal window
# show ip ospf interface brief

For detailed interface information:

Terminal window
# show ip ospf interface
# show ip ospf interface <interface>

Display OSPF neighbor adjacencies:

Terminal window
# show ip ospf neighbor

Key information displayed:

  • Neighbor ID (router ID)
  • Priority
  • State (FULL, 2WAY, etc.)
  • Dead time
  • Interface
  • Neighbor IP address

Display only OSPF routes:

Terminal window
# show ip route ospf

Display the link-state database:

Terminal window
# show ip ospf database

Display OSPF process details, timers, and areas:

Terminal window
# show ip ospf

Cisco Discovery Protocol (CDP) is a Layer 2 protocol that discovers directly connected Cisco devices.

Display basic information about directly connected devices:

Terminal window
# show cdp neighbors

Information displayed:

  • Device ID (hostname)
  • Local interface
  • Hold time
  • Capability (Router, Switch, etc.)
  • Platform (model)
  • Remote port ID

Display detailed information including IP addresses and IOS version:

Terminal window
# show cdp neighbors detail

Check if CDP is enabled:

Terminal window
# show cdp

Display CDP status on interfaces:

Terminal window
# show cdp interface
Terminal window
(config)# cdp run # Enable CDP globally
(config)# no cdp run # Disable CDP globally
(config-if)# cdp enable # Enable CDP on interface
(config-if)# no cdp enable # Disable CDP on interface

Display current DHCP leases:

Terminal window
# show ip dhcp binding

Display DHCP pool utilization:

Terminal window
# show ip dhcp pool

Display DHCP server statistics:

Terminal window
# show ip dhcp server statistics

Display IP address conflicts:

Terminal window
# show ip dhcp conflict

Display all configured access lists:

Terminal window
# show access-lists

Display a specific access list:

Terminal window
# show access-lists <number/name>

Example:

Terminal window
# show access-lists 10
# show access-lists BLOCK_TELNET

Display which ACLs are applied to an interface:

Terminal window
# show ip interface <interface> | include access list

Display the current active configuration:

Terminal window
# show running-config

Display the saved configuration in NVRAM:

Terminal window
# show startup-config

Display files stored in flash memory:

Terminal window
# show flash:
# dir flash:

Display system log messages:

Terminal window
# show logging

Filter logs by severity:

Terminal window
# show logging | include <keyword>

Display system time and date:

Terminal window
# show clock

Display CPU utilization and running processes:

Terminal window
# show processes cpu
# show processes memory

Compare running configuration with startup configuration:

Terminal window
# show archive config differences

This shows what has changed since the last save.