Cisco IOS-XR SNMP Troubleshooting: Commands That Matter - 夜莺博客

Cisco IOS-XR SNMP Troubleshooting: Commands That Matter

SNMP timeouts and slow polls on Cisco IOS-XR routers are rarely caused by the network management station — they usually point to how the XR SNMP agent processes PDUs. This article explains the SNMP architecture inside IOS-XR, including the mibd process, caching, and parallel versus serialized processing, then walks through the exact show and debug commands used to isolate PDU performance problems on ASR 9000 platforms. You will learn which counters to collect, how to read the trace request log, and how to spot slow MIB objects.

How SNMP Works Inside IOS-XR

When an SNMP GetRequest, GetNextRequest or GetBulk PDU arrives, the SNMP engine parses it and dispatches the variable bindings to the responsible process — for example, IF-MIB objects go to mibd_interface. A look-ahead cache can answer getnext requests without touching the hardware. There is also a statsd cache enabled with snmp-server ifmib stats cache, refreshed every 30 seconds for all interfaces.

Key SNMP Troubleshooting Commands

show snmp
show snmp trace requests
show snmp mib access
show snmp mib access time
show snmp mib statistics
show snmp queue rx
show snmp queue trap

Technique notes:

  • show snmp — global agent counters (incoming/outgoing request and trap PDUs, error PDUs). Periodically collect output to determine the PDU response rate and error rate.
  • show snmp trace requests — a sliding window log of PDU processing (Rx, Proc Start, Tx time). Decode it to find poller source IPs, per-source queue lengths, and how long PDUs waited before processing.
  • show snmp mib access / access time — per-OID operation counters and timestamps; diffing these shows exactly what was polled during a period.
  • show snmp mib statistics — per-OID transaction time statistics (count + min/max/avg). High averages or large variance point to a slow MIB object.
  • show snmp queue rx / queue trap — min/max/avg sizes of the PDU receive, pending and trap queues, with real-time and 5-minute views.

Debug Commands (Use with Care)

debug snmp request
debug snmp packet

debug snmp request logs every OID processed by every PDU to syslog, and debug snmp packet logs the same data as show snmp trace requests. Disable logging trap debug if snmp trap syslog is configured, or you will create a trap storm. On NMS side, review timeout and retry settings — row traversal with get-bulk and adequate retries avoids most apparent SNMP failures.

More IOS-XR troubleshooting: input drops in IOS-XR, CRC errors on IOS-XR and the bundle troubleshooting guide.

原文链接:https://community.cisco.com/t5/service-providers-knowledge-base/asr9000-xr-understanding-snmp-and-troubleshooting/ta-p/3144621