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

8

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.

Other related questions:
Why do some traps fail to reach the NMS after the SNMP trap function is configured on an S series switch
For S series switches (except the S1700), not all traps are enabled by default. If a type of trap is not enabled, the NMS cannot receive traps of this type. To check the list of currently enabled traps, run the display snmp-agent trap all command in the system view. You can run the snmp-agent trap enable feature-name feature-name command in the system view to enable a specified type of trap or the snmp-agent trap enable command to enable all the traps.

SNMP configuration on S series switch
S series switches (except S1700 switches) support three SNMP versions: SNMPv1, SNMPv2c, and SNMPv3. SNMPv1 and SNMPv2c use community names for authentication, resulting in low security, whereas SNMPv3 uses authentication and encryption technologies to enhance security. The following uses SNMPv2c configuration as an example: [HUAWEI] snmp-agent //Enable SNMP. [HUAWEI] snmp-agent sys-info version v2c //Set the SNMP version to SNMPv2c. [HUAWEI] snmp-agent community write adminnms01 //Set the SNMP write community name. For common SNMP configuration information, see "Common SNMP Operations" in S1720&S2700&S3700&S5700&S6700&S7700&S9700 Series Switches Common Operation Guide. For typical SNMP configuration examples, see "Typical SNMP Configuration" in "Typical Network Management and Monitoring Configuration" of S1720&S2700&S3700&S5700&S6700&S7700&S9700 Typical Configuration Examples. Common configuration and typical configuration examples for S9300 and S12700 series switches are the same as those for Sx700 series switches. The Sx700 series switches are used as an example here.

How to view log history on S series switches
For S series switches (except the S1700), you can only view the latest cached logs and traps in the buffer. If you want to view earlier messages, run the display logfile file-name command to check log files stored in the logfile or syslogfile folder on the storage card.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top