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.
system-view
snmp-agent trap enable
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.
To disable the trap functions of all modules, run the snmp-agent trap disable command.
To restore the trap functions of all modules to the default status, run the undo snmp-agent trap enable or undo snmp-agent trap disable command.
To disable the trap function of a specific module, run the undo snmp-agent trap enable feature-name command.
To delete trap configurations related to one or all functions in a batch, run the clear configuration snmp-agent trap enable feature-name feature-name command.
snmp-agent mib-view { excluded | included } view-name oid-tree
If a few MIB objects on a device or some objects in the current MIB view do not or no longer need to be managed by the NMS, excluded needs to be specified in the related command to exclude these MIB objects.
If a few MIB objects on the device or some objects in the current MIB view need to be managed by the NMS, included needs to be specified in the related command to include these MIB objects.
If the NMS or devices are on an insecure network, you are advised to configure authentication-mode and privacy-mode in the command to enable data authentication and encryption.
3DES and DES56 are less secure, and AES128 or higher is recommended.
To improve system security, you are advised to configure different authentication and encryption passwords for an SNMP user.
The difference between alarms in trap and Inform modes is as follows:
A managed device does not need to receive a response from the NMS when sending an alarm in trap mode. Therefore, no remote engine ID needs to be configured on the managed device.
A managed device needs to receive a response from the NMS when sending an alarm in Inform mode. Therefore, specify the NMS engine ID on the managed device. The remote engine ID must be the same as the engine ID of the destination host that receives the alarm. If the managed device receives no response from the NMS within a timeout period, it resends the alarm until a response is returned or the number of alarms reaches the configured upper limit.
The managed device sends the alarm in Inform mode and records an alarm log at the same time. If the NMS or a link fails, the NMS can synchronize alarms generated during this period after the fault is rectified.
Therefore, the alarm in Inform mode is more reliable than that in trap mode. However, a device needs to cache massive alarm messages and consume a great number of memory resources due to the retransmission mechanism.
If the network environment is stable, sending alarms in trap mode is recommended. If device resources are sufficient and the network environment is unstable, sending alarms in Inform mode is recommended.
The same destination host cannot be configured for Inform and trap messages. If the Inform and trap messages share the same destination host, the latest configuration overrides the previous configuration.
Configuring trap parameters:
Configuring inform parameters: