Skip to content

Instantly share code, notes, and snippets.

@roulette6
Last active May 12, 2018 15:50
Show Gist options
  • Save roulette6/b04ca82840b3f56c27230d11535db554 to your computer and use it in GitHub Desktop.
Save roulette6/b04ca82840b3f56c27230d11535db554 to your computer and use it in GitHub Desktop.
Useful show commands

Useful show commands

TOC

Analyzing switch interface status

show interfaces [<interface>]
show interfaces description // (line) status = layer 1 and protocol = layer 2
show interfaces status // status = combo of line status and protocol status

Counters and their descriptions

  • Runts: Frames below min frame size requirement of 64 bytes
  • Giants: Frames bigger than the max frame size req of 1518 bytes
  • Input errors: Total of many counters, including runts, giants, no buffer, CRC, frame overrun, and ignored counts
  • CRC: Received frames that didn't pass the FCS math; can be caused by collisions
  • Frame: Received frames with an illegal format, such as ending in partial byte; can be caused by collisions
  • Packets output: Total # of frames forwarded out the interface
  • Output errors: Total # of frames the switch tried to transmit but a problem occurred
  • Collisions: All collisions that occur when the interface is transmitting a frame. Late collisions:__ Collisions that occur after the 64th byte of the frame has been transmitted; usually points to a duplex mismatch.

MAC addresses

show mac address-table                    // show entire table
show mac address-table address <mac addr> // show only addr indicated
show ip arp                               // show entire ARP table
show ip arp <ip addr>                     // show indicated ARP table entry

troubleshooting VLANs

show vlan brief
show vlan
show vlan id <id>
show interfaces [<interface>] switchport // gives vlan/trunking info and admin/operational info
show mac address-table
show interfaces trunk                  // Lists info about all operational trunks, incl. allowed VLANs
show vtp status                        // Lists VTP config and status info

Analyzing LAN topology with CDP

Info learned by CDP

show cdp neighbors
show cdp neighbors <interface>
show cdp neighbors detail
show cdp entry <entry name> // details for single entry, case-sensitive

Status of CDP protocols

show cdp
show cdp interface [<interface>]
show cdp traffic

STP

show spanning-tree
show spanning-tree interface <interface>
show spanning-tree interface <interface> state
show spanning-tree vlan <id>
show spanning-tree [vlan <id>] root
show spanning-tree [vlan <id>] bridge
show spanning-tree summary
debug spanning-tree events
show spanning-tree interface <interface> portfast
show etherchannel [channel group number] <brief | detail | port | port-channel | summary>

VTP

show vtp status
show vtp password

DHCP

show ip dhcp binding
show ip dhcp pool [poolname]
show ip dhcp server statistics
show ip dhcp conflict

OSPF

show ip route ospf
show ip ospf [interface <if>]
show ip ospf database
show ip ospf neighbor [<if>]
show ip ospf interface brief
show ip protocols

EIGRP

show ip protocols
show ip eigrp interfaces [<if>]
show ip eigrp interfaces detail
show ip eigrp neighbors [interface <if>]
show ip eigrp topology [<subnet/CIDR>]
show ip eigrp topology | section <subnet>
show ip eigrp topology all-links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment