
66
Configuring trap sending parameters
Configuration prerequisites
•
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 other.
Configuration procedure
The SNMP module buffers the traps received from a module in a trap queue. You can set the size of the
queue, the duration that the queue holds a trap, and trap target (destination) hosts, typically the NMS.
Follow these steps to configure trap sending 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
By default, SNMP chooses the IP
address of an interface to be the
source IP address of traps.
Extend the standard
linkUp/linkDown traps
snmp-agent trap if-mib link
extended
Optional
Standard linkUp/linkDown traps
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 trap holding time
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.