SONiC Troubleshooting Guide: Drops, Optics, Techsupport - 夜莺博客

SONiC Troubleshooting Guide: Drops, Optics, Techsupport

SONiC's Linux-based architecture gives you a powerful toolkit when things go wrong — but only if you know which counter means what. The official SONiC troubleshooting guide organizes diagnostics into a small set of high-yield steps: understanding the RX/TX counter families, reading optical DOM values from transceivers, generating a techsupport dump before any isolation step, and cleanly shutting down BGP sessions to take a misbehaving switch out of service. This article walks each step with real output so you can apply the same workflow on any SONiC distribution.

Investigating Packet Drops

Start with interface counters:

admin@sonic:~$ show interfaces counters
        Iface      RX_OK   RX_RATE   RX_UTIL   RX_ERR   RX_DRP   RX_OVR
      Ethernet0  471,729,839,997  653.87 MB/s  12.77%   0   18,682   0

Counter semantics are critical:

  • RX_ERR/TX_ERR — physical layer (L2) issues: FCS errors, runt frames. Indicates link-level problems.
  • RX_DRP — ingress pipeline drops: L2/L3/ACL drops and insufficient ingress buffer.
  • TX_DRP — egress buffer drops due to congestion, including WRED.
  • RX_OVR/TX_OVR — oversized packets.

Physical Link Signal

Check optical receive power with transceiver DOM (AOC/DAC cables have no DOM values); optical power should generally be above -10 dBm:

admin@sonic:~$ show interfaces transceiver eeprom Ethernet12 --dom
ChannelMonitorValues:
  RX1Power : -5.7398dBm
  RX2Power : -4.6055dBm
  RX3Power : -5.0252dBm
  RX4Power : -12.5414dBm   <-- suspect: below -10 dBm

Generate a Techsupport Dump

Before isolating a device, collect a dump (equivalent of 'show tech' on other NOSes):

admin@sonic:~$ show techsupport

The archive lands in /var/dump/<HOSTNAME>_YYYYMMDD_HHMMSS.tar.gz and includes interface details, routes, BGP state, transceiver info, syslog and configs.

Isolate the Device from the Network

When a SONiC switch behaves abnormally, shut down BGP sessions without touching the config:

sudo config bgp shutdown neighbor SONIC02SPINE     # by hostname
sudo config bgp shutdown neighbor 192.168.1.124    # by IP
sudo config bgp shutdown all                        # everything

SONiC is also covered in our Cisco 8000 XR to SONiC migration article.

原文链接:https://github.com/sonic-net/SONiC/wiki/Troubleshooting-Guide