No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


MIB Reference

AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R007

This document provides the function overview, relationships between tables, description of single objects, description of MIB tables, and description of alarm objects.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Setting Trap Parameters on a Managed Device

Setting Trap Parameters on a Managed Device


Fault information about a managed device can be sent to the NMS through SNMP trap messages. The NMS can monitor fault information on a managed device only when the managed device is enabled to send trap messages and the destination IP address of trap messages is set. This section provides commands for setting trap parameters.


Before configuring a managed device to send trap messages, ensure that the information center has been enabled using the info-center enable command.


  1. Run the system-view command to enter the system view.
  2. Run the snmp-agent trap enable command to enable the managed device to send trap messages to the NMS.


    Executing the snmp-agent trap enable command enables the trap function of all modules. To enable the trap function of a specified module, run the snmp-agent trap enable feature-name feature-name command.

  3. Run the snmp-agent target-host trap-paramsname paramsname { { v1 | v2c } securityname securityname | v3 securityname securityname { authentication | noauthnopriv | privacy } } [ binding-private-value ][ private-netmanager ] command to set parameters for sending trap messages.


    If SNMPv3 is used, the value of securityname must be set to a user name. This parameter must be set both on the managed device and NMS. If the NMS needs to receive trap messages by the managed device, the trap messages must pass the authentication and encryption specified by this parameter.

    If SNMPv1 or SNMPv2c is used, the NMS can receive trap messages of all managed devices. The trap messages do not need to pass authentication and encryption specified by securityname. This parameter is used to distinguish multiple devices configured with the same destination IP address of trap messages.

    The security level of a managed device cannot be lower than that of the user specified by securityname. otherwise, the managed device cannot send trap messages.

    The security levels are in descending order of priority:
    • Level 1: privacy (authentication and encryption)
    • Level 2: authentication (authentication only)
    • Level 3: noauthnopriv (no authentication and no encryption)

  4. Run the snmp-agent target-host trap-hostname hostname address { ipv4-addr [ udp-port udp-portid ] [ public-net | vpn-instance vpn-instance-name ] | ipv6 ipv6-addr [ udp-port udp-portid ] } trap-paramsname paramsname command to specify the destination host for receiving trap messages and error codes.

    Set the parameters according to the following notes:

    • The default destination UDP port number is 162. If interfaces are occupied (for example, mirroring is configured on a known port to prevent attacks), run the udp-port command to change the UDP port number to a non-well-known port number so that the NMS and managed device can communicate.

    • If trap messages sent from the managed device to the NMS need to be transmitted over a public network, specify public-net. If trap messages sent from the managed device to the NMS need to be transmitted over a private network, configure vpn-instance vpn-instance-name to specify a VPN instance over which trap messages are transmitted.

Checking the Configuration

Run the following commands to check whether parameters of trap messages are correctly set.

  • Run the display current-configuration | include trap command to check the configuration of the trap function.
  • Run the display snmp-agent trap all command to check the current and default status of the trap function of all features.
  • Run the display snmp-agent target-host command to check information about target hosts.
Updated: 2019-06-05

Document ID: EDOC1000097213

Views: 121524

Downloads: 681

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next