Configuring SNMP Trap
Configure SNMP Trap
Traps are used when the Device needs to alert the Network Management software of an event without being polled. Traps ensure that the NMS gets information if a certain event occurs on the device that needs to be recorded without being polled by the NMS first. Managed network devices will have Trap MIBs with predefined conditions built into them. It’s crucial that the Network management system has these MIBs compiled into them to receive any traps sent by the given device/s. The primary focus of this feature is to support SNMP Trap notifications and in particular, linkUp, linkDown and config change trap notifications.
Supported MIBs
MIBS added to support SNMP Trap
DISMAN-EVENT-MIB.txt
INET-ADDRESS-MIB.txt
IPV6-TC.txt
SNMP-FRAMEWORK-MIB.txt
SNMPv2-SMI.txt
DISMAN-SCHEDULE-MIB.txt
IP-FORWARD-MIB.txt
IPV6-UDP-MIB.txt
SNMP-MPD-MIB.txt
SNMPv2-TC.txt
ENTITY-MIB.txt
IP-MIB.txt
MTA-MIB.txt
SNMP-NOTIFICATION-MIB.txt
SNMPv2-TM.txt
HOST-RESOURCES-MIB.txt
IPV6-ICMP-MIB.txt
NETWORK-SERVICES-MIB.txt
SNMP-TARGET-MIB.txt
SNMP-VIEW-BASED-ACM-MIB.txt
HOST-RESOURCES-TYPES.txt
IPV6-MIB.txt
NOTIFICATION-LOG-MIB.txt
SNMP-USER-BASED-SM-MIB.txt
TCP-MIB.txt
IF-MIB.txt
IPV6-TCP-MIB.txt
SNMP-COMMUNITY-MIB.txt
SNMPv2-MIB.txt
UDP-MIB.txt
With these MIBs, you can trigger sending an SNMP trap to a configured SNMP-server host based on certain events. Also, GET/GETNext/WALK operations can be supported on these mibs. The linkUp and linkDown traps are sent to the configured host in the event that an interface Admin or Oper status changes from up to down or vice-versa. The configChange trap monitors NPB (MAP, rule, port-npb config) and port (Speed, MTU, FEC, Autoneg) configuration changes. A configChangeTrap PDU is sent to the host when any value in these tables are modified, added or removed.
It's recommended not to set up more than 4 SNMP-Trap servers.
Reference
Command
[no] snmp-server trap modify <version><ip4addr|ip6addr> [port <value>] [community
<value>]
Description
SNMP trap configuration
Parameters
Version, IPv4 or v6 Address , port, community values
Mode
CONFIG
Example
You can verify the configuration by using the command(s) below:
Traps are only supported on SNMPv2c
Disable PSU/FAN traps:
Below commands can be used to disable FAN/PSU traps temporarily,
Reference
Command
snmp-server trap (psu-util/fan-util) disable
Description
disable PSU/FAN traps temperoraly
Parameters
FAN/PSU
Mode
EXEC
By default, traps are generated every 60 seconds, which may cause unnecessary stress on memory and CPU. To mitigate this, disabling the default behaviour using the above command is recommended for disabling PSU and FAN traps.
This will result in traps being generated only when the PSU/FAN state changes, reducing the load on memory and CPU.