< Home

(Optional) Configuring the Trap Function

You can configure the trap function for the device to send traps of specific features to the NMS, which will help you to locate important problems. In addition, you can set trap sending parameters to improve trap sending reliability.

Procedure

  1. Access the system view.

    system-view

  2. Enable the trap functions of all modules.

    snmp-agent trap enable

  3. Enable the trap function of a feature module.

    snmp-agent trap enable feature-name feature-name trap-name trap-name

    This means that a trap of a specific feature can be sent to the NMS.

  4. Configure trap function parameters based on the trap usage or inform usage selected during the configuration of basic SNMPv2c functions.

    If traps are used, follow the procedure described in Configuring trap parameters; if informs are used, follow the procedure described in Configuring inform parameters.

    Configuring trap parameters:

    1. Run the snmp-agent notify-filter-profile { excluded | included } profile-name oid-tree command to specify or update the traps that can be sent to the NMS.

      At present, the snmp-agent notify-filter-profile command supports either the variable OID of a character string or an object name. If the entered parameter is a character string, the asterisk (*) can be used as the mask. The asterisk (*) can be placed only in the middle, not at the beginning or end of the string.

    2. Run the snmp-agent trap source interface-type interface-number command to specify the source interface for traps.

      After the source interface is specified, its IP address becomes the source IP address of trap messages. Configuring the IP address of the local loopback interface as the source interface is recommended, which can ensure device security.

      The source interface configured for the trap message on the FW must be the same as that configured on the NMS; otherwise, the NMS will discard the trap message.

    3. Run the snmp-agent trap source-port port-number command to specify the source port for traps.

      The source port is fixed, the packets can be filtered by FW to improve the security of the network.

    4. Run the snmp-agent trap queue-size size command to set the length of the queue storing traps to be sent to the destination host.

      The queue length depends on the number of generated trap messages. If the FW frequently generates trap messages, a longer queue length can be set to prevent trap messages from being lost.

    5. Run the snmp-agent trap life seconds command to set the lifetime of every trap.

      The lifetime of every trap message depends on the number of generated trap messages. If the FW frequently generates trap messages, a longer lifetime can be set for every trap message to prevent trap messages from being lost.

    6. Run the snmp-agent trap start-trap resend disable command to disable the function of resending device cold-start or warm-start traps.

      By default, the function of resending device cold-start or warm-start traps is enabled.

    Configuring inform parameters:

    1. Run the snmp-agent inform { timeout seconds | resend-times times | pending number }* command to set the timeout period for waiting for Inform ACK messages, number of inform retransmissions, and allowable maximum number of informs to be acknowledged.

      If the network is unstable, you need to specify the number of inform retransmissions and allowable maximum number of informs to be acknowledged when you set a timeout period for waiting for Inform ACK messages. By default, the timeout period for waiting for Inform ACK messages is 15 seconds; the number of inform retransmissions is 3; the allowable maximum number of informs waiting to be acknowledged is 39.

    2. Run the snmp-agent inform { timeout seconds | resend-times times } * address udp-domain ip-address [ vpn-instance vpn-instance-name ] params securityname [ cipher ] security-string command to set the timeout period for waiting for Inform ACK messages from a specified NMS and the number of inform retransmissions.

      If the network is unstable, you need to specify the number of inform retransmissions to be acknowledged when you set a timeout period for waiting for Inform ACK messages. By default, the timeout period for waiting for Inform ACK messages is 15 seconds, and the number of inform retransmissions is 3.

    3. Run the snmp-agent notification-log enable command to enable the alarm logging function.

      If the link between the managed device and the NMS fails, the managed device will stop sending informs to the NMS because the NMS is unroutable but the managed device will continue logging informs. If the link recovers, the NMS will learn the informs logged by the managed device during the link failure.

      After the alarm logging function is enabled, the system logs only informs, not traps.

      By default, the alarm logging function is disabled.

    4. Run the snmp-agent notification-log { global-ageout ageout | global-limit limit }* command to set the aging time of alarm logs and maximum number of alarm logs allowed to be stored in the log buffer.

      By default, the aging time of alarm logs is 24 hours. If the aging time expires, alarms logs will be automatically deleted.

      By default, the log buffer can store a maximum of 500 alarm logs. If the number of alarm logs in the log buffer exceeds 500, the device will delete the alarm logs from the earliest one.

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