(Optional) Configuring the Trap Function

The device can be configured to send specified traps to the NMS, which facilitates fault locating. To enhance the trap transmission security, specify parameters for sending traps.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run snmp-agent trap enable

    The device is enabled to send traps to the NMS.

  3. Run snmp-agent trap enable feature-name feature-name trap-name trap-name

    The device is enabled to send a specified trap of a specified feature to the NMS.

    If the snmp-agent trap enable command has been run to enable the trap functions of all modules, or the snmp-agent trap enable feature-name command has been run to enable a specific trap function, note the following:

  4. Run either or both of the following commands as required to specify the source IP address for sending traps:

    • Run the snmp-agent trap source interface-type interface-number command to specify a source interface for sending traps. After a source interface is specified, its IP address is used as the source IP address of traps. To ensure device security, you are advised to configure the IP address of the local loopback interface as that of the source interface. The source interface of traps specified on the router must be the same as that specified for the router on the NMS. Otherwise, the NMS does not accept the traps sent from the router.
    • Run the snmp-agent trap source ipv6 ipv6-address [ vpn-instance vpn-name ] command to specify a source IPv6 address for sending traps.

  5. Run snmp-agent trap source-port port-number

    A source port number is specified for traps.

    To improve network security, configure a specific source port number for traps. After that, the user terminal's firewall filters packets based on the port number.

  6. (Optional) Run snmp-agent trap type { base-trap | entity-trap }

    The format of traps sent to the NMS is set.

    In VS mode, this command is supported only by the admin VS.

  7. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >