Verification and Troubleshooting
Pipe Filters
Section titled “Pipe Filters”Cisco IOS supports piping output through filters to find specific information quickly.
Available Filters
Section titled “Available Filters”- 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
Pipe Filter Examples
Section titled “Pipe Filter Examples”# show running-config | section dhcp# show running-config | include username# show running-config | exclude !# show ip route | begin Gateway# show running-config | countDevice Information
Section titled “Device Information”Show IOS Version and System Information
Section titled “Show IOS Version and System Information”Display IOS version, uptime, hardware model, and configuration register:
# show versionShow CDP Neighbors
Section titled “Show CDP Neighbors”Cisco Discovery Protocol (CDP) identifies directly connected Cisco devices:
# show cdp neighborsFor detailed neighbor information including IP addresses:
# show cdp neighbors detailShow Login Failures
Section titled “Show Login Failures”Display failed login attempts:
# show login failuresShow Configuration Sections
Section titled “Show Configuration Sections”View specific configuration sections using pipe filters:
# show running-config | section dhcp# show running-config | section router# show running-config | section interfaceInterface Status
Section titled “Interface Status”IPv4 Interface Status
Section titled “IPv4 Interface Status”Quick overview of all interfaces (status and IP addresses):
# show ip interface briefIPv6 Interface Status
Section titled “IPv6 Interface Status”Quick overview of all IPv6-enabled interfaces:
# show ipv6 interface briefDetailed Interface Information
Section titled “Detailed Interface Information”View detailed interface statistics and configuration:
# show interfaces# show interfaces <interface>Example:
# show interfaces gigabitEthernet 0/0Switch Commands
Section titled “Switch Commands”Show Switchport Configuration
Section titled “Show Switchport Configuration”Display switchport mode and VLAN information:
# show interfaces <port> switchportAdministrative 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:
# show interfaces fastEthernet 0/1 switchportShow Trunk Ports
Section titled “Show Trunk Ports”Display all trunk ports and their allowed VLANs:
# show interfaces trunkShow Spanning Tree Information
Section titled “Show Spanning Tree Information”View detailed STP information for a specific interface:
# show spanning-tree# show spanning-tree interface <interface> detailExample:
# show spanning-tree interface gigabitEthernet 0/1 detailShow EtherChannel Status
Section titled “Show EtherChannel Status”Display EtherChannel summary and member ports:
# show etherchannel summaryFor detailed EtherChannel information:
# show etherchannel port-channelShow VLAN Information
Section titled “Show VLAN Information”# show vlan brief# show vlan id <vlan_number>Show MAC Address Table
Section titled “Show MAC Address Table”# show mac address-table# show mac address-table interface <interface>Router Commands
Section titled “Router Commands”Show Routing Table
Section titled “Show Routing Table”Display the complete routing table:
# show ip routeShow Static Routes Only
Section titled “Show Static Routes Only”Display only statically configured routes:
# show ip route staticShow Connected Routes
Section titled “Show Connected Routes”Display directly connected networks:
# show ip route connectedShow Default Route
Section titled “Show Default Route”Display the gateway of last resort:
# show ip route 0.0.0.0NAT Commands
Section titled “NAT Commands”Show NAT Configuration
Section titled “Show NAT Configuration”Display NAT configuration:
# show ip natShow NAT Translations
Section titled “Show NAT Translations”Display active NAT translation table:
# show ip nat translationsShow NAT Statistics
Section titled “Show NAT Statistics”Display NAT statistics (hits, misses, pool usage):
# show ip nat statisticsClear NAT Translations
Section titled “Clear NAT Translations”Remove dynamic NAT entries:
# clear ip nat translation *EIGRP Commands
Section titled “EIGRP Commands”Show EIGRP Topology
Section titled “Show EIGRP Topology”Display the EIGRP topology table (all learned routes):
# show ip eigrp topologyShow EIGRP Neighbors
Section titled “Show EIGRP Neighbors”Verify EIGRP neighbor adjacencies:
# show ip eigrp neighborsKey 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
Show EIGRP Interfaces
Section titled “Show EIGRP Interfaces”Display interfaces participating in EIGRP:
# show ip eigrp interfacesShow Routing Protocols
Section titled “Show Routing Protocols”Confirm EIGRP configuration and parameters:
# show ip protocolsShow EIGRP Routes in Routing Table
Section titled “Show EIGRP Routes in Routing Table”Display only EIGRP routes:
# show ip route eigrpOSPF Commands
Section titled “OSPF Commands”Show OSPF Interface Status
Section titled “Show OSPF Interface Status”Quick overview of OSPF-enabled interfaces:
# show ip ospf interface briefFor detailed interface information:
# show ip ospf interface# show ip ospf interface <interface>Show OSPF Neighbors
Section titled “Show OSPF Neighbors”Display OSPF neighbor adjacencies:
# show ip ospf neighborKey information displayed:
- Neighbor ID (router ID)
- Priority
- State (FULL, 2WAY, etc.)
- Dead time
- Interface
- Neighbor IP address
Show OSPF Routes in Routing Table
Section titled “Show OSPF Routes in Routing Table”Display only OSPF routes:
# show ip route ospfShow OSPF Database
Section titled “Show OSPF Database”Display the link-state database:
# show ip ospf databaseShow OSPF Process Information
Section titled “Show OSPF Process Information”Display OSPF process details, timers, and areas:
# show ip ospfNetwork Discovery (CDP)
Section titled “Network Discovery (CDP)”Cisco Discovery Protocol (CDP) is a Layer 2 protocol that discovers directly connected Cisco devices.
Show CDP Neighbors
Section titled “Show CDP Neighbors”Display basic information about directly connected devices:
# show cdp neighborsInformation displayed:
- Device ID (hostname)
- Local interface
- Hold time
- Capability (Router, Switch, etc.)
- Platform (model)
- Remote port ID
Show CDP Neighbors Detail
Section titled “Show CDP Neighbors Detail”Display detailed information including IP addresses and IOS version:
# show cdp neighbors detailShow CDP Status
Section titled “Show CDP Status”Check if CDP is enabled:
# show cdpShow CDP Interface Status
Section titled “Show CDP Interface Status”Display CDP status on interfaces:
# show cdp interfaceEnable/Disable CDP
Section titled “Enable/Disable CDP”(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 interfaceDHCP Commands
Section titled “DHCP Commands”Show DHCP Bindings
Section titled “Show DHCP Bindings”Display current DHCP leases:
# show ip dhcp bindingShow DHCP Pool Statistics
Section titled “Show DHCP Pool Statistics”Display DHCP pool utilization:
# show ip dhcp poolShow DHCP Server Statistics
Section titled “Show DHCP Server Statistics”Display DHCP server statistics:
# show ip dhcp server statisticsShow DHCP Conflicts
Section titled “Show DHCP Conflicts”Display IP address conflicts:
# show ip dhcp conflictAccess Control List (ACL) Commands
Section titled “Access Control List (ACL) Commands”Show All ACLs
Section titled “Show All ACLs”Display all configured access lists:
# show access-listsShow Specific ACL
Section titled “Show Specific ACL”Display a specific access list:
# show access-lists <number/name>Example:
# show access-lists 10# show access-lists BLOCK_TELNETShow ACL Applied to Interface
Section titled “Show ACL Applied to Interface”Display which ACLs are applied to an interface:
# show ip interface <interface> | include access listTroubleshooting Commands
Section titled “Troubleshooting Commands”Show Running Configuration
Section titled “Show Running Configuration”Display the current active configuration:
# show running-configShow Startup Configuration
Section titled “Show Startup Configuration”Display the saved configuration in NVRAM:
# show startup-configShow Flash Contents
Section titled “Show Flash Contents”Display files stored in flash memory:
# show flash:# dir flash:Show Logging
Section titled “Show Logging”Display system log messages:
# show loggingFilter logs by severity:
# show logging | include <keyword>Show Clock
Section titled “Show Clock”Display system time and date:
# show clockShow Processes
Section titled “Show Processes”Display CPU utilization and running processes:
# show processes cpu# show processes memoryComparison Commands
Section titled “Comparison Commands”Compare Configurations
Section titled “Compare Configurations”Compare running configuration with startup configuration:
# show archive config differencesThis shows what has changed since the last save.