Tuesday 7 July 2020

SNMPv2c and SNMPv3 Polling and Traps Configuration in Cisco (IOS-XR)



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-ALLOW
 10 permit ipv4 host 192.168.20.199 any

snmp-server contact DC-ADMIN
snmp-server location Datacentre
snmp-server trap-source Loopback0
snmp-server community snmpcomm123 RO SystemOwner IPv4 SNMP-ALLOW


SNMPv2c Traps Configuration:
configure
snmp-server traps
snmp-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:
Group Name: SNMPGROUP
SNMP Polling Server: 192.168.20.199
SNMP Trap Server: 192.168.20.200

SNMPv3 Polling Configuration:

ipv4 access-list SNMP-ALLOW
 10 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


Here's the Juniper version for SNMPv2c and SNMPv3 configuration --> SNMP Configuration in Juniper

No comments:

Post a Comment