Common SNMP Operations : Configuring the Device to Send Traps

Created Aug 25, 2016 16:35:11 3192 0 0 0

After the trap function is enabled and the trap host is configured, the device automatically sends traps to the trap host.

  1. Enable the trap function.

    Enable the trap function for the SNMP module.

    <HUAWEI> system-view
    [HUAWEI] snmp-agent trap enable feature-name snmp
    NOTE:

    If the trap function is not enabled for 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 IP address 10.1.1.1 as the interface to send traps.

    <HUAWEI> system-view
    [HUAWEI] interface loopback 0
    [HUAWEI-LoopBack0] ip address 10.1.1.1 32
    [HUAWEI-LoopBack0] quit
    [HUAWEI] snmp-agent trap source loopback 0
    NOTE:

    After the interface is 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 that 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 to 10.1.2.10, UDP port number to 50000, security name to user001, trap version to v3, and security level to privacy.

    <HUAWEI> system-view
    [HUAWEI] snmp-agent target-host trap address udp-domain 10.1.2.10 udp-port 50000 params securityname user001 v3 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.

 

 

 

 


  • x
  • convention:

Responses

Reply
You need to log in to reply to the post Login | Register

Notice:To ensure the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but not limited to politically sensitive content, content concerning pornography, gambling, drug abuse and trafficking, content that may disclose or infringe upon others' intellectual properties, including commercial secrets, trade marks, copyrights, and patents, and personal privacy. Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see“ Privacy Policy.”
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top