Cisco Switch Troubleshooting Commands

Scope

Below are some useful commands that can be used to diagnose and troubleshoot Livewire problems within a Cisco switch.

Description

It is common for people to issue a "show running-config" command to determine whether a Cisco switch is programmed correctly for Livewire, but there are also several other useful commands that can show the status of IGMP querier, cpu load, spanning-tree status, and others.

These commands work on Cisco Catalyst switches, however depending on the model and version of IOS you are using, some commands could vary slightly. All commands should be entered in privileged mode (login and then type "enable")

IGMP (Multicast)

Check IGMP snooping

Diagnostic benefit:

Useful for checking multicast IP address groups and what ports subscribe to them

Command:

sh ip igmp snooping groups

Expected output format:

Vlan      Group                    Type        Version     Port List
-----------------------------------------------------------------------
1        224.0.1.129              igmp        v2          Gi1/0/11, Gi1/0/19
1        238.38.38.38             igmp        v2          Gi1/0/19
1        239.128.0.0              igmp        v2          Gi1/0/7
1        239.128.0.251            igmp        v2          Gi1/0/7
1        239.192.0.101            igmp        v2          Gi1/0/19
1        239.192.1.245            igmp        v2          Gi1/0/4
1        239.192.1.246            igmp        v2          Gi1/0/4
1        239.192.4.1              igmp        v2          Gi1/0/19
1        239.192.4.127            igmp        v2          Gi1/0/14
1        239.192.6.171            igmp        v2          Gi1/0/11
[output cut]

Show IGMP Group Count

Diagnostic benefit:

Shows how many IGMP groups are actively being queried on the switch. Useful for diagnosing if the number of active groups exceed the switch's capability.

Command:

sh ip igmp snooping groups count

Expected output:

Total number of multicast groups: 123

Check IGMP querier

Diagnostic benefit:

Determine the active querier on each vlan.

Command:

sh ip igmp snooping querier detail

Expected output:

Global IGMP switch querier status
--------------------------------------------------------
admin state                    : Enabled
admin version                  : 2
source IP address              : 0.0.0.0        
query-interval (sec)           : 60
max-response-time (sec)        : 25
querier-timeout (sec)          : 205
tcn query count                : 2
tcn query interval (sec)       : 10

Vlan 1:   IGMP switch querier status
--------------------------------------------------------
elected querier is 10.100.40.5     (this switch querier)
--------------------------------------------------------
admin state                    : Enabled
admin version                  : 2
source IP address              : 10.100.40.5    
query-interval (sec)           : 60
max-response-time (sec)        : 25
querier-timeout (sec)          : 205
tcn query count                : 2
tcn query interval (sec)       : 10
operational state              : Querier
operational version            : 2
tcn query pending count        : 0

Topology

Discover other Cisco switches connected to your switch

Diagnostic benefit:

Discover the Cisco switches that are connected to this switch, including what ports they are connected to.

Command:

sh cdp neighbors

Expected output:

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
Switch           Gig 1/0/23        175              S I   WS-C2960- Gig 0/1

Show the connected switch's details

Diagnostic benefit:

Discover more details about the Cisco switches that are connected to this switch, including IP address, IOS, native VLAN, and others.

Command:

sh cdp neighbors detail

Expected output:

Device ID: Switch
Entry address(es): 
  IP address: 10.100.40.254
Platform: cisco WS-C2960-24TT-L,  Capabilities: Switch IGMP 
Interface: GigabitEthernet1/0/23,  Port ID (outgoing port): GigabitEthernet0/1
Holdtime : 172 sec

Version :
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE11, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2017 by Cisco Systems, Inc.
Compiled Sat 19-Aug-17 09:34 by prod_rel_team

advertisement version: 2
Protocol Hello:  OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010231FF000000000000002291282A00FF0000
VTP Management Domain: ''
Native VLAN: 1
Duplex: full
Management address(es): 
  IP address: 10.100.40.254

Spanning-Tree Protocol Status

Diagnostic benefit:

Show the status of STP on your switch per vlan, which switch is designated as the "root bridge," and what the status of each ports are.

Command:

sh spanning-tree 

Expected output:

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     1833.9d49.4c00
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     1833.9d49.4c00
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi1/0/24            Desg FWD 4         128.24   P2p 
[output cut]

Switch Environment

Show switch CPU utilization

Diagnostic benefit:

Understand if switch CPU is running at acceptable levels. Identifies processes that may be utilizing too much processing power.

Command:

sh processes cpu

Expected output:

CPU utilization for five seconds: 9%/0%; one minute: 10%; five minutes: 10%
 PID Runtime(ms)   Invoked      uSecs   5Sec   1Min   5Min TTY Process 
   1           0        11          0  0.00%  0.00%  0.00%   0 Chunk Manager    
   2           0       510          0  0.00%  0.00%  0.00%   0 Load Meter       
   3           6        22        272  0.00%  0.00%  0.00%   0 DHCPD Timer      
   4       19828      1127      17593  0.00%  0.55%  0.65%   0 Check heaps      
   5           0         2          0  0.00%  0.00%  0.00%   0 Pool Manager     
   6           0         2          0  0.00%  0.00%  0.00%   0 Timers           
   7           0         1          0  0.00%  0.00%  0.00%   0 License Client N 
   8        4193        44      95295  0.00%  0.18%  0.13%   0 Licensing Auto U 
   9           0         1          0  0.00%  0.00%  0.00%   0 Image License br 
[output cut]

Show switch CPU utilization (graph)

Diagnostic benefit:

Historical, graph version of the sh processes cpu command.

Command:

sh processes cpu history

Expected output:

                                                              
    11                                   11111111111111111111 
    2299999999999999999999888888888899999000000000000000111117
100                                                           
 90                                                           
 80                                                           
 70                                                           
 60                                                           
 50                                                           
 40                                                           
 30                                                           
 20                                                           
 10 **********************************************************
   0....5....1....1....2....2....3....3....4....4....5....5....
             0    5    0    5    0    5    0    5    0    5    
               CPU% per second (last 60 seconds)
                                                              
    11113111111111111111111111111111111111111111              
    52642654458335556545566444245555644556885548              
100                                                           
 90                                                           
 80                                                           
 70                                                           
 60                                                           
 50                                                           
 40                                                           
 30     *                                                     
 20 * * ***  **  ***** ****     *****  ******* *              
 10 ############################################              
   0....5....1....1....2....2....3....3....4....4....5....5....
             0    5    0    5    0    5    0    5    0    5    
               CPU% per minute (last 60 minutes)
              * = maximum CPU%   # = average CPU%
                                                                          
                                                                          
                                                                          
100                                                                       
 90                                                                       
 80                                                                       
 70                                                                       
 60                                                                       
 50                                                                       
 40                                                                       
 30                                                                       
 20                                                                       
 10                                                                       
   0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.
             0    5    0    5    0    5    0    5    0    5    0    5    0 
                   CPU% per hour (last 72 hours)
                  * = maximum CPU%   # = average CPU%

Show switch temperature and fan status

Diagnostic benefit:

Determine temperature and fan status of switch to check overheating.

Command:

sh env all

Expected output:

FAN is OK
TEMPERATURE is OK
Temperature Value: 25 Degree Celsius
Temperature State: GREEN
Yellow Threshold : 50 Degree Celsius
Red Threshold    : 60 Degree Celsius
SW  PID                 Serial#     Status           Sys Pwr  PoE Pwr  Watts
--  ------------------  ----------  ---------------  -------  -------  -----
 1  Built-in                                         Good

SW  Status          RPS Name          RPS Serial#  RPS Port#
--  -------------   ----------------  -----------  ---------
1   <>              <>

Let us know how we can help

If you have further questions on this topic or have ideas about improving this document, please contact us.