Cisco IOS XR SNMP & Syslog Configuration
SNMP v2c and v3 with traps, syslog forwarding, and NetFlow export configuration for Cisco IOS XR routers. Covers NMS integration and operational visibility.
What is it?
SNMP and Syslog are the primary operational visibility mechanisms on IOS XR routers. SNMP allows NMS platforms (SolarWinds, PRTG, LibreNMS, Zabbix) to poll router statistics (CPU, memory, interface counters, BGP/OSPF state) and receive asynchronous traps when events occur. IOS XR supports SNMPv2c (community-based) and SNMPv3 (authenticated and encrypted) — SNMPv3 with authPriv is strongly recommended for production. Syslog sends structured log messages to a central SIEM or log aggregator. IOS XR syslog uses the logging command without the ip prefix (unlike IOS), and the source interface should always be Loopback0 for consistent log source identification. Model-driven telemetry (gNMI/gRPC) is the modern complement to SNMP on IOS XR for streaming metrics.
When to use
- ·Any production router that needs to be monitored by an NMS or SIEM platform
- ·Service provider environments where BGP, OSPF, and MPLS state changes must be centrally tracked
- ·Compliance environments (PCI-DSS, SOC2, ISO 27001) requiring centralized logging and change tracking
- ·NetFlow export to traffic analysis platforms (Scrutinizer, ntopng, Elastic) for capacity planning
- ·Any deployment where operational teams need real-time alerting on link failures or routing events
When NOT to use
- ·Isolated lab routers with no NMS — SNMP adds complexity without operational benefit in a lab
- ·When SNMPv2c is the only option and security policy requires encrypted management — implement SNMPv3 or gNMI instead
How it compares
Prerequisites
- →Syslog and SNMP trap receivers must be reachable from the router, either in-band or via the management VRF
- →For SNMPv3, the NMS must be configured with matching auth (SHA) and priv (AES128) parameters and the same username
- →NetFlow requires sufficient route processor memory — verify with show processes memory on the RP
- →Logging source interface (Loopback0) must be up and reachable from the syslog server
Config Generator
Verification commands
show snmpVerify SNMP is running and show packet counters
ExpectedInput/output packet counters incrementing. No authentication failures shown.
show snmp usersVerify SNMPv3 user is configured with correct auth/priv settings
ExpectedUser listed with authProtocol SHA and privProtocol AES
show loggingView buffered logs and verify syslog configuration
ExpectedRecent log messages visible, syslog destinations listed at top
show flow monitor MONITOR-1 statisticsVerify NetFlow monitor is collecting flows
ExpectedActive and inactive flow counts incrementing
Debug commands
show snmp trapShow recent SNMP traps generated and sent to receivers
WarningUse to verify trap delivery. If no traps shown, check SNMP trap configuration and receiver reachability.
show flow exporter EXPORTER-1 statisticsVerify NetFlow export packets are being sent to the collector
WarningCheck for export errors — destination unreachable or UDP port mismatch on collector
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
CCNP Enterprise Core ENCOR 350-401 Official Cert Guide
Brad Edgeworth et al. · Cisco Press · Network management: SNMP v1/v2c/v3, syslog levels, NTP, NetFlow