The snmp-agent target-host inform command sets the target host for receiving Inform messages.
The undo snmp-agent target-host command cancels the target host set to receive Inform messages.
By default, the target host for receiving Inform messages is not set.
snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname { security-name | cipher security-name } v2c [ notify-filter-profile profile-name | ext-vb ] *
snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname security-name v3 [ authentication | privacy ] [ notify-filter-profile profile-name | ext-vb ] *
undo snmp-agent target-host ip-address securityname { security-name | cipher security-name } [ vpn-instance vpn-instance-name ]
undo snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ vpn-instance vpn-instance-name | public-net ] ] * params securityname { security-name | cipher security-name }
Parameter | Description | Value |
---|---|---|
address |
Specifies the IP address of a specified target host. |
- |
udp-domain ip-address |
Specifies the IP address of a specified target host, with the transmission domain being based on UDP. |
It is dotted decimal notation. |
udp-port port-number |
Specifies the UDP port of the specified target host for receiving Inform messages. |
The value is an integer ranging from 0 to 65535. The default value is 162. |
source interface-type interface-number |
Specifies the source interface of the device for sending Inform messages. |
- |
vpn-instance vpn-instance-name |
Specifies VPN instance to which the target host belongs. |
The value must be an existing VPN instance name. |
public-net |
Indicates the target host is on the public network. |
- |
params |
Indicates information about the target host that generates SNMP notifications. |
- |
securityname security-name |
Specifies the user security name displayed on the NMS. For SNMPv3, securityname must be configured as the user name. securityname configured on the host needs to be the same as that configured on the NMS, or the NMS cannot receive the trap messages sent from the host. Ensure that the security-name value is the same as the created user name; otherwise, the NMS cannot access the device. For SNMPv1 and SNMPv2c, the NMS can receive trap messages from all hosts without having securityname configured. securityname is used to distinguish multiple hosts that generate trap messages. |
The value is a string of 1 to 32 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
cipher security-name |
Indicates the unencrypted or encrypted string of security name. |
The value is a string of 1 to 32 case-sensitive characters or a string of 32, 48, 56, or 68 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
|
v2c |
Indicates the SNMP version is SNMPv2c. |
- |
v3 |
Indicates the SNMP version is SNMPv3. |
- |
authentication | privacy |
Specifies the security mode.
This parameter takes effect only in SNMPv3. |
- |
notify-filter-profile profile-name |
Specifies the filtering view name. |
The filtering view must exists. |
ext-vb |
Indicates that traps sent to a target host carry extended bound variables. If a Huawei data communication device extends the trap objects defined in the public MIB, you can configure this parameter to determine whether traps sent to the NMS carry extended bound variables.
|
- |
Usage Scenario
After sending an Inform message, the device waits for an Inform ACK message from the NMS and will retransmit the same Inform message only when no Inform ACK message is received from the NMS within the specified period. If the SNMP agent does not receive the inform ACK message from the NMS during the retransmission period, the SNMP agent deletes this inform message from the trap queue. This ensures that the NMS can receive the SNMP Inform messages to the maximum extent.
If there are multiple target hosts, you need to run the snmp-agent target-host inform command on each target host. If the snmp-agent target-host inform command is executed for multiple times on the target host, only the last successful operation takes effect.
Configuration Impact
The transmission of Inform messages, however, consumes more resources than that of traps.
Precautions
The snmp-agent notify-filter-profile command is used to create or update the trap filtering information. The NMS filters trap messages according to the profile and sends only the eligible trap messages to the target host. If notify-filter-profile is not configured, all trap messages are sent to the target host.
When SNMPv3 is used to send Inform messages, run the snmp-agent remote-engineid usm-user v3 command to configure a remote SNMPv3 user whose remote engine ID must be the same as the engine ID of the destination host.
The securityname configuration of an SNMPv2c alarm host is displayed in ciphertext, whereas the securityname configuration of an SNMPv3 alarm host is displayed in simple text. For SNMPv2c, when a user with a level lower than the level configured using this command queries the securityname configured using the display this command, the securityname is displayed as asterisks (******).
# Configure alarms to be sent in inform mode, set the security name of the host to 123 and protocol version to SNMPv2c, and send alarms to the NMS host with the IP address of 192.168.10.1.
<HUAWEI> system-view [HUAWEI] snmp-agent trap enable [HUAWEI] snmp-agent target-host inform address udp-domain 192.168.10.1 params securityname 123 v2c