How can I configure an S series switch running SNMP to send traps to an NMS

You can run the snmp-agent target-host trap command to configure an S series switch (except the S1700) running SNMP to send traps to a specified NMS.
Example:
1. SNMPv1
[HUAWEI] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname huawei123 v1
2. SNMPv2c
[HUAWEI] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname huawei123 v2c
3. SNMPv3
[HUAWEI] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname huawei123 v3
Note:
For SNMPv3, securityname in the command must be configured as the user name on the NMS and switch running SNMP. The NMS can receive traps from a switch running SNMP only after passing the securityname verification (including authentication and encryption modes).
For SNMPv1 and SNMPv2c, the NMS can receive traps from all switches running SNMP without verifying the securityname parameter. securityname is used to distinguish multiple switches running SNMP that send traps.

Scroll to top