268 CHAPTER 11: SYSTEM MANAGEMENT
only query the device information, whereas the community with read-write
authority can also configure the device.
Use the following commands to set the community name.
Perform the following configuration in system view.
Enabling and Disabling the SNMP Agent to Send a Trap
The managed device transmits a trap without a request to the NMS to report
critical and urgent events, such as a restart.
You can use the following commands to enable or disable the managed device to
transmit a trap message.
Perform the following configuration in system view.
Setting the Destination Address of a Trap
You can use the following commands to set or delete the destination address of
the trap.
Perform the following configuration in system view.
Tabl e 299 Setting the Community Name
Operation Command
Set the community name and the access
authority
snmp-agent community { read |
write } community-name [ [
mib-view view-name ] [ acl
acl-list ] ]
Remove the community name and the access
authority
undo snmp-agent community
community-name
Tabl e 300 Enabling and Disabling an SNMP Agent to Send a Trap
Operation Command
Enable to send a trap snmp-agent trap enable [ standard
[ authentication ] [ coldstart ]
[ linkdown ] [ linkup ] [
warmstart ] ]
Disable to send a trap undo snmp-agent trap enable [
standard [ authentication ] [
linkdown ] [ linkup ] [ coldstart
] [ warmstart ] ]
Tabl e 301 Setting the Destination Address of a Trap
Operation Command
Set the destination address of trap snmp-agent target-host trap
address udp-domain host-addr [
udp-port udp-port-number ] params
securityname community-string [
v1 | v2c | v3 { authentication |
privacy } ]
Delete the destination address of trap undo snmp-agent target-host
host-addr securityname
community-string