
1-25
View
System view
Parameters
size
: The maximum number of traps that can be stored in the queue, an integer ranging from 1 to 1,000.
Description
Use the
snmp-agent trap queue-size
command to set the length of the queue of the SNMP traps to be
sent to the destination.
Use the
undo snmp-agent trap queue-size
command to restore the default queue length.
By default, an SNMP trap queue can contain up to 100 SNMP traps.
After a trap is generated, it will enter the trap queue to be sent. The length of a trap queue decides the
maximum number of traps in the queue. When a trap queue reaches the configured length, the newly
generated traps will enter the queue, and the traps generated the earliest will be discarded.
Related commands:
snmp-agent trap enable
,
snmp-agent target-host
, and
snmp-agent trap life
.
Examples
# Set the SNMP trap queue length to 200.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent trap queue-size 200
snmp-agent trap source
Syntax
snmp-agent trap source
interface-type interface-number
undo snmp-agent trap source
View
System view
Parameters
interface-type interface-number
: Interface type and interface number. The source IP address of the trap
is the IP address of this interface.
Description
Use the
snmp-agent trap source
command to configure the source address for the SNMP traps sent.
Use the
undo snmp-agent trap source
command to cancel the configuration.
By default, the outbound interface is determined by SNMP and the IP address of this interface is used
as the source IP address of the traps.
After the command is executed, the system uses the primary IP address of the specified interface as the
source IP address of the traps sent. Thus on the NMS you can use the IP address to uniquely identify
the agent.
For example, although the agent uses different outbound interfaces to send traps, the NMS can still use
the IP address to filter all the traps that the agent sends.