1-4 
Operation  Command  Description 
Add a user to an SNMP 
group 
snmp-agent usm-user v3 
user-name group-name 
[ cipher ] authentication-mode 
{ md5 | sha } auth-password 
[ privacy-mode { des56 | 
aes128 } priv-password ] ] [ acl 
acl-number ] 
Required 
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. 
 
 
Switch 4210 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 used by SNMP agents and the 
UDP port used by SNMP trap respectively. 
z  Executing the undo snmp-agent command disables the SNMP agent and closes UDP ports used 
by SNMP agent and SNMP trap 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. 
Table 1-3 Configure basic Trap 
Operation  Command  Description 
Enter system view 
system-view 
— 
Enable the switch to send 
Trap messages to NMS 
snmp-agent trap enable [ configuration | 
flash | standard [ authentication | coldstart 
| linkdown | linkup | warmstart ]* | system | ] 
Enable 
the port to 
Enter port view 
or interface view 
interface interface-type interface-number 
Optional 
By default, a port 
is enabled to send 
all types of Traps.