SONiC Troubleshooting: Packet Drops and Link Issues - 夜莺博客

SONiC Troubleshooting: Packet Drops and Link Issues

SONiC gives you Linux-grade tooling on open networking switches, but its counter model and CLI differ from traditional NOSes — which is exactly where troubleshooting goes wrong. This guide, based on the official SONiC community troubleshooting wiki, explains how to interpret interface counters, read transceiver DOM data, generate techsupport dumps and safely isolate a suspect device from the network.

Investigating Packet Drops 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

Learn the counter vocabulary:

  • RX_ERR/TX_ERR: physical-layer (L2) drops — FCS errors, runt frames. Non-zero values usually mean a physical link problem.
  • RX_DRP: ingress pipeline drops (L2/L3/ACL) plus insufficient ingress buffer.
  • TX_DRP: egress buffer congestion drops, including WRED.
  • RX_OVR/TX_OVR: oversized packet counts.

Checking Optical Signal Strength

admin@sonic:~$ show interfaces transceiver eeprom Ethernet12 --dom

Read the RX/TX power values from the DOM output. As a rule of thumb optical receive power should stay above -10 dBm. Note that AOC and DAC cables do not expose channel monitor values, so a missing reading there is normal, not a fault.

Collecting a Tech-Support Dump

admin@sonic:~$ show techsupport

This is SONiC's equivalent of show tech on other NOSes: it packages counters, logs and system state into an archive you can hand to the community or your vendor. Generate it before touching anything else — especially before isolating the device.

Isolating a Suspect Device

When a SONiC device looks like it is dropping traffic, shut down its BGP sessions first — neighbor by hostname, by IP, or all at once:

admin@sonic:~$ sudo config bgp shutdown neighbor SONIC02SPINE
admin@sonic:~$ sudo config bgp shutdown neighbor 192.168.1.124
admin@sonic:~$ sudo config bgp shutdown all

For a broader SONiC workflow, see installing SONiC via ONIE and the Supermicro SONiC configuration guide.

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