Configuring trap sending parameters
Configuration prerequisites
Before you configure trap parameters, complete the following tasks:
• Complete the basic SNMP settings and check that they are the same as on the NMS. If SNMPv1 or
SNMPv2 is used, you must configure a community name. If SNMPv3 is used, you must configure an
SNMPv3 user and MIB view.
• The device and the NMS can reach each other.
Configuration procedure
When traps are sent to the SNMP module, the SNMP module saves the traps in the trap queue. You can
set the size of the queue and the holding time of the traps in the queue, and send the traps to the specified
destination host, usually the NMS.
Follow these steps to configure trap parameters:
To do… Use the command… Remarks
Enter system view system-view —
Configure a target host
snmp-agent target-host trap
address udp-domain { ip-address |
ipv6 ipv6-address } [ udp-port
port-number ] params
securityname security-string [ v1 |
v2c | v3 [ authentication |
privacy ] ]
Required if the trap destination is a
host. The ip-address argument must
be the IP address of the host.
Configure the source address for
traps
snmp-agent trap source
interface-type interface-number
Optional
Extend the standard
linkUp/linkDown trap
snmp-agent trap if-mib link
extended
Optional
Standard linkUp/linkDown traps
defined in RFC are used by default.
Configure the trap queue size snmp-agent trap queue-size size
Optional
The default trap queue size is 100.
Configure the holding time of the
traps in the queue
snmp-agent trap life seconds
Optional
120 seconds by default
NOTE:
• Extended linkUp/linkDown traps add interface description and interface type to standard
linkUp/linkDown traps. If the NMS does not support extended SNMP messages, use standard
linkUp/linkDown traps.
• When the trap queue is full, the oldest traps are automatically deleted for new traps.
• A trap is deleted when its holding time expires.
89