Here is sample commands in configuring SNMPv2 and SNMPv3 in Cisco IOS-XR devices. It also detailed on how to configure SNMP traps for your Network Monitoring System.
SNMPv2c
community: snmpcomm123
management IP address: 192.168.10.100
SNMP Polling Server: 192.168.20.199
SNMP Trap Server: 192.168.20.200
SNMPv2c Polling Configuration:
ipv4 access-list SNMP-ALLOW10 permit ipv4 host 192.168.20.199 any
snmp-server contact DC-ADMINsnmp-server location Datacentresnmp-server trap-source Loopback0snmp-server community snmpcomm123 RO SystemOwner IPv4 SNMP-ALLOW
SNMPv2c Traps Configuration:
configuresnmp-server trapssnmp-server host 192.168.20.200 traps snmpcomm123
Verify:
/usr/bin/snmpwalk -M /usr/local/snmp/mibs -v2c -c snmpcomm123 192.168.10.100:161 sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS XR Software (Cisco ASR9K Series), Version 6.2.3[Default]
Copyright (c) 2018 by Cisco Systems, Inc.
SNMPv3
user: snmpuser
Security Level: Authpriv with SHA authentication and AES 128bit Privacy
management IP address: 192.168.10.100
AuthPass: authpass123!
PrivPass: privpass123!
View Name: ALLVIEW
Username:
Username:
Group Name: SNMPGROUP
SNMP Polling Server: 192.168.20.199
SNMP Trap Server: 192.168.20.200
SNMPv3 Polling Configuration:
ipv4 access-list SNMP-ALLOW10 permit ipv4 host 192.168.20.199 any
snmp-server view ALLVIEW 1.3 included
snmp-server group SNMPGROUP v3 priv notify ALLVIEW read ALLVIEW IPv4 SNMP-ALLOW
snmp-server user SNMPUSER SNMPGROUP v3 auth sha authpass123! priv aes 128 privpass123! IPv4 SNMP-ALLOW
SNMPv3 Traps Configuration:
snmp-server host 192.168.20.200 traps version 3 priv SNMPUSER
Additional Tip: (Manual trigger of SNMP traps)
#snmp test trap interface link-down
#snmp test trap interface link-up
#snmp test trap interface link-up
Here’s the Juniper version for SNMPv2c and SNMPv3 configuration –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Juniper
[…] Here’s the Cisco version for SNMPv2c and SNMPv3 configuration –> SNMP Configuration in Cisco IOS-XR […]
[…] Related link –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Cisco (IOS-XR) […]
[…] v2c Here’s the SNMPv2c and SNMPv3 configuration Cisco –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Cisco (IOS-XR) Juniper –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Juniper Share […]
[…] Related link –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Cisco (IOS-XR) […]
[…] Related link –> SNMPv2c and SNMPv3 Polling and Traps Configuration in Cisco (IOS-XR) […]