snmp-agent target-host trap-paramsname
Function
The snmp-agent target-host trap-paramsname command configures parameters for sending trap messages. The trap sending parameter list is composed of these parameters.
The undo snmp-agent target-host trap-paramsname command deletes a trap sending parameter list.
Format
snmp-agent target-host trap-paramsname paramsname { { v1 | v2c } securityname securityname | v3 securityname securityname { authentication | noauthnopriv | privacy } } [ binding-private-value ] [ private-netmanager ]
undo snmp-agent target-host trap-paramsname paramsname
Parameters
Parameter |
Description |
Value |
---|---|---|
paramsname |
Specifies the name of a trap sending parameter list. |
The value is a string of 1 to 32 characters. |
v1 |
Indicates SNMPv1. This parameter specifies SNMPv1 as the trap message sending protocol. |
- |
v2c |
Indicates SNMPv2c. This parameter specifies SNMPv2c as the trap message sending protocol. |
- |
v3 |
Indicates SNMPv3. SNMPv3 protocol contains the basic functions of SNMPv1 and SNMPv2 and defines a series of management functions for network security and access control. This parameter specifies SNMPv3 as the trap message sending protocol. |
- |
securityname securityname |
Indicates the host name in the trap message. When the trap sending protocol is the SNMPv3 protocol, this parameter is the user name in the SNMPv3 group. |
In the case of a plain text password, the value is a string of 1 to 32 case-sensitive characters, without spaces. In the case of a cipher text password, the value is a string of 48 to 68 case-sensitive characters, without spaces. |
authentication |
Authenticates but not encrypts trap messages. When the trap sending protocol is SNMPv3, this parameter can authenticate (the receiver) but not encrypt (the sender) trap messages. |
- |
noauthnopriv |
Authenticates and encrypts no trap message. When the trap sending protocol is SNMPv3, this parameter is used as if no trap message needs to be authenticated (the receiver) or encrypted (the sender). |
- |
privacy |
Authenticates and encrypts trap messages. When the trap sending protocol is SNMPv3, this parameter can authenticate (the receiver) and encrypt (the sender) trap messages. |
- |
binding-private-value | Indicates that trap messages sent to a target host carry extended bound variables. If alarm objects defined in public MIBs are extended on a Huawei data communication device, you can use the binding-private-value parameter to determine whether the corresponding trap messages sent from the device to an NMS carry extended bound variables.
|
- |
private-netmanager |
# Configure the Huawei NMS as the target host to receive trap messages. After the Huawei NMS is used, the alarm message sent to the Huawei NMS can contain more detailed information, such as the alarm type, alarm ID, and send time of the alarm message. |
- |
Example
# Configure the trap sending parameter list: set the list name to aaa, set SNMPv3 as the trap sending protocol, set the host name in the SNMP trap as bbb, and authenticate but do not encrypt the trap messages.
<AC6605> system-view [AC6605] snmp-agent target-host trap-paramsname aaa v3 securityname bbb authentication