Configuring trap parameters, Configuring basic trap – H3C Technologies H3C WX3000 Series Unified Switches User Manual
Page 409
41-5
To do…
Use the command…
Remarks
Set the maximum size of an SNMP
packet for SNMP agent to receive
or send
snmp-agent packet max-size
byte-count
Optional
1,500 bytes by default.
Set the device engine ID
snmp-agent local-engineid
engineid
Optional
By default, the device engine ID is
“enterprise number + device
information”.
Create or update the view
information
snmp-agent mib-view
{ included
| excluded } view-name oid-tree
[ mask mask-value ]
Optional
By default, the view name is
“ViewDefault” and OID is 1.
The device provides the following functions to prevent attacks through unused UDP ports.
z
Executing the snmp-agent command or any of the commands used to configure SNMP agent
enables the SNMP agent, and at the same opens UDP port 161 and UDP port 1024 used by SNMP
agents and SNMP trap clients respectively.
z
Executing the undo snmp-agent command disables the SNMP function and closes UDP port 161
and UDP port 1024 as well.
Configuring Trap Parameters
Configuring Basic Trap
Trap messages refer to those sent by managed devices to the NMS without request. They are used to
report some urgent and important events (for example, the rebooting of managed devices).
Note that basic SNMP configuration is performed before you configure basic trap.
Follow these steps to configure basic Trap:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable the device to send Trap
messages to NMS
snmp-agent trap enable
[ configuration | flash |
standard
[ authentication | coldstart | linkdown |
linkup
| warmstart ]* | system | ]
Enter port view or
interface view
interface interface-type interface-number
Enable the port or
interface to send
Trap messages
enable snmp trap updown
Enable the
port to
send Trap
messages
Quit to system
view
quit
Optional
By default, a port is
enabled to send all
types of Traps.
Set the destination for Trap
messages
snmp-agent target-host trap address
udp-domain
{ ip-address } [ udp-port
port-number
] params securityname
security-string
[ v1 | v2c | v3 {authentication |
privacy
} ]
Required