show running-config
The configuration the device is using right now, held in RAM. Changes you type take effect here immediately and are lost on reload unless saved.
When to use it: confirm what is configured on a port, line, or VLAN. Pipe it to narrow it down.
show running-config
show running-config interface g0/1
show running-config | include hostname
show startup-config
The saved configuration in NVRAM that loads at boot. If it differs from the running-config, someone made changes and has not saved them.
When to use it: before a reload, or to check whether a change was saved.
show startup-config
show ip interface brief
One line per interface: IP address, Status (layer 1), and Protocol (layer 2). up/up is healthy; administratively down means the port is shut down.
When to use it: the first command on almost any connectivity problem.
show ip interface brief
show interfaces
Full detail per interface: line and protocol state, MAC address, MTU, speed and duplex, input/output rates, and error counters such as CRC errors, runts, giants, and collisions.
When to use it: a link is up but slow or flaky, and you suspect a duplex mismatch or a bad cable.
show interfaces g0/1
show interfaces statusswitch
A switch-port table: description, status (connected, notconnect, disabled, err-disabled), VLAN (or trunk), duplex, speed, and media type.
When to use it: a quick health check of every access port, or finding a port in err-disabled.
show interfaces status
show vlan briefswitch
Each VLAN ID, name, status, and the access ports assigned to it. Trunk ports are not listed here.
When to use it: a PC is in the wrong broadcast domain, or you need to confirm a VLAN exists.
show vlan brief
show mac address-tableswitch
MAC addresses the switch has learned, with the VLAN and the port each one was seen on.
When to use it: track down which port a device is plugged into.
show mac address-table
show mac address-table address 00a1.b2c3.d4e5
show cdp neighbors
Directly connected Cisco devices found by Cisco Discovery Protocol: device ID, your local port, platform, and their port ID. Add detail for their IP address and IOS version.
When to use it: map the physical topology or confirm which neighbor a cable reaches. LLDP is the vendor-neutral equivalent (show lldp neighbors).
show cdp neighbors
show cdp neighbors detail
show version
IOS version and image file, uptime, the reason for the last reload, model, memory, and the configuration register.
When to use it: checking software before an upgrade, or finding out whether a device rebooted overnight.
show version
show inventory
Hardware parts list: chassis, modules, power supplies, and installed transceivers, each with a product ID (PID) and serial number.
When to use it: opening a support case or doing an asset audit.
show inventory
show ip routerouter / L3
The routing table. Codes: C connected, L local (the interface's own address), S static, O OSPF, and S* or the "Gateway of last resort" line for the default route.
When to use it: traffic reaches the router but not the remote network.
show ip route
show interfaces trunkswitch
Which ports are trunking, their native VLAN, and which VLANs are allowed and active on each trunk.
When to use it: a VLAN works on one switch but not across the uplink.
show interfaces trunk