Hello there, Community!
This post talks about configuring the device to send traps, as part of the common SNMP operations. Please see more details below.
BACKGROUND
After the trap function has been enabled and the trap host has been configured, the device will automatically send traps to the trap host.
PROCEDURE
1. Enable the trap function. Enable the trap function for the SNMP module.
Note:
If the trap function is not enabled for the modules, each module uses the default trap configuration. To view the default trap configuration of each module, run the display snmp-agent trap all command. The trap function of the SNMP module is used as an example here.
2. Configure the interface to send traps.
Configure LoopBack0 with the IP address 10.1.1.1 as the interface to send traps.
Note:
After the interface has been configured, the IP address of the interface is used to send traps. To ensure device security, it is recommended that you configure a loopback interface to send traps.
The trap sending interface configured on the switch must be the same as the one configured on the NMS; otherwise, the NMS cannot receive traps. In addition, a reachable route must exist between the IP addresses of trap sending interface and trap host.
3. Configure the trap host.
Set the trap host address as 10.1.2.10, the UDP port number as 50000, security name as user001, trap version to v3 and the security level to privacy.
Note:
The trap version must be the same as the SNMP version configured on the device; otherwise, traps cannot be sent to the NMS. When the version is set to v3, the security name must be the same as the created user name; otherwise, traps cannot be sent to the NMS. v1 and v2c do not have limitation on the configuration of security names.
The default UDP port number is 162. After the UDP port number is changed, you must reconfigure the UDP port of the NMS that receives traps. If the UDP ports of the device and NMS are different, traps cannot be sent to the NMS.
The security level of the trap host cannot be lower than the security level of the user.
More information: S Series Switches Common Operation Guide.