Network Switch Troubleshooting Guide
Practical troubleshooting guide for network switches covering connectivity issues, VLAN problems, LACP failures, OSPF/BGP neighbors, and performance bottlenecks. Step-by-step diagnostic procedures.
Introduction
Network switch issues are among the most common causes of network outages. This guide provides a systematic approach to diagnosing and resolving the most frequent switch problems.
Troubleshooting Methodology
Follow the OSI layer model from bottom to top:
- Layer 1: Physical connectivity, cables, SFP modules
- Layer 2: MAC addresses, VLANs, spanning-tree, LACP
- Layer 3: IP addressing, routing, ACLs
Layer 1: Physical Layer Issues
Port Not Coming Up
# Check interface status
show interfaces status
show interfaces GigabitEthernet 0/1 status
# Check for errors
show interfaces GigabitEthernet 0/1 counters
# Check transceiver info (DOM)
show interfaces GigabitEthernet 0/1 transceiver
Common causes and solutions:
| Symptom | Likely Cause | Solution |
|---|---|---|
| No link light | Cable failed | Replace cable |
| Flapping link | Bad SFP or cable | Clean/replace SFP |
| CRC errors | Cable too long or bad | Check distance/specs |
| No SFP detected | Wrong SFP type | Verify compatibility |
SFP Module Issues
# Verify SFP is recognized
show idprom interface GigabitEthernet 0/1
# Check DOM (Digital Optical Monitoring)
show interfaces GigabitEthernet 0/1 dom
# Verify SFP speed/duplex match
show interfaces GigabitEthernet 0/1 capabilities
Layer 2: Switching Issues
VLAN Not Working
Symptom: Devices on same VLAN can't communicate.
# 1. Verify VLAN exists
show vlan
show vlan 10
# 2. Verify port is in correct VLAN
show interfaces GigabitEthernet 0/1 switchport
# 3. Check if port is trunk or access
# Access port (for single VLAN):
switchport mode access
switchport access vlan 10
# Trunk port (for multiple VLANs):
switchport mode trunk
switchport trunk allowed vlan 10,20,99
Common VLAN issues:
| Issue | Check | Fix |
|---|---|---|
| No inter-VLAN routing | ip routing enabled? | Enable ip routing |
| SVI down | no shutdown on VLAN interface | Admin up SVI |
| Wrong native VLAN | Native VLAN mismatch | Set matching native VLAN |
| VLAN pruning | VLAN not allowed on trunk | Add to trunk allowed list |
Spanning-Tree Blocking Ports
# Check spanning-tree status
show spanning-tree
show spanning-tree interface GigabitEthernet 0/1
# Check for unexpected root bridge
show spanning-tree root
# Verify port is forwarding
# Root port: Always forwarding
# Designated port: Forwarding
# Alternate/backup: Blocked
Common STP issues:
| Symptom | Cause | Solution |
|---|---|---|
| Port always blocking | Loop detected | Check for physical loops |
| Multiple root ports | Switch not root | Verify root election |
| Port won't become designated | Priority issue | Adjust STP priority |
LACP Not Forming
# Check LACP system ID
show lacp system-id
# Check LACP neighbors
show lacp neighbor
show lacp internal
# Verify port-channel interface
show interfaces Port-Channel 1
show interfaces Port-Channel 1 status
LACP troubleshooting:
| Symptom | Cause | Fix |
|---|---|---|
| No neighbor | Both ends passive | Set one side active |
| Port-channel down | Speed mismatch | Match port speeds |
| Partial member | Some ports failed | Check individual ports |
| Wrong load balance | Hash algorithm | Adjust port-channel load-balance |
Layer 3: Routing Issues
OSPF Neighbor Not Establishing
# Check OSPF neighbor state
show ip ospf neighbor
show ip ospf neighbor detail
# Verify interface configuration
show ip ospf interface brief
show ip ospf interface GigabitEthernet 0/1
# Check area IDs match
show ip ospf | include Area
OSPF troubleshooting:
| Symptom | Cause | Fix |
|---|---|---|
| State EXSTART | MTU mismatch | Set matching MTU |
| State INIT | Hello blocked | Check ACLs/firewall |
| State 2WAY | DR/BDR election issue | Usually normal, check priority |
| FULL (but no routes) | Area mismatch | Verify area IDs |
BGP Peer Not Coming Up
# Check BGP summary
show ip bgp summary
# Check peer state
show ip bgp neighbors 192.168.1.1
# Verify TCP connection
show tcp brief all
# Check BGP advertised routes
show ip bgp neighbors 192.168.1.1 advertised-routes
BGP troubleshooting:
| Symptom | Cause | Fix |
|---|---|---|
| Idle/Active | TCP connection failed | Check Layer 3 reachability |
| Connection refused | ACL blocking port 179 | Permit TCP 179 |
| No routes | Route-target mismatch (EVPN) | Check RT import/export |
Performance Issues
High CPU Usage
# Check CPU utilization
show processes cpu
# Check for traffic storms
show interfaces counters rate
# Check for spanning-tree changes
show spanning-tree topology-change
Common causes:
- Broadcast/multicast storm (check for loops)
- High routing table updates
- Spanning-tree topology changes
- Excessive SNMP polling
High Memory Usage
# Check memory
show memory
show processes memory
# Check for route table bloat
show ip route summary
show ip bgp vpnv4 unicast summary
Diagnostic Workflow Summary
1. User reports connectivity issue
|
2. Check physical layer
|--> Cable/SFP OK? Port up?
|
3. Check VLAN membership
|--> Right VLAN? Trunk allowed?
|
4. Check spanning-tree
|--> Port forwarding?
|
5. Check routing
|--> Routes present? Gateway reachable?
|
6. Check ACLs
|--> Policy blocking traffic