The snmp-agent target-host inform command sets the destination IP address of an Inform message.
The undo snmp-agent target-host command deletes the current setting.
snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ public-net | vpn-instance vpn-instance-name ] ] * params securityname { security-string | cipher security-string } 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 | [ public-net | vpn-instance vpn-instance-name ] ] * params securityname security-string v3 [ authentication | privacy ] [ notify-filter-profile profile-name | ext-vb ] *
undo snmp-agent target-host inform address udp-domain ip-address [ udp-port port-number | source interface-type interface-number | [ public-net | vpn-instance vpn-instance-name ] ] * params securityname { security-string | cipher security-string }
Usage Scenario
To help the NMS manage devices efficiently, run the snmp-agent target-host inform command to set the destination IP address of an Inform message and to filter Inform trap messages. SNMPv2c does not authenticate or encrypt packets, but SNMPv3 authenticates and encrypts packets.
Prerequisites
Precautions
To enable the trap function for a device, you need to use the snmp-agent target-host inform command together with the snmp-agent trap enable command.
When setting a target host for traps, its VPN instances must be matched to the VPN instances bound to source interfaces of the host; otherwise, traps may fail to be sent.
The securityname configuration of an SNMPv2c alarm host is displayed in ciphertext, while the securityname configuration of an SNMPv3 alarm host is displayed in simple text.
When SNMPv3 is used to send Inform messages, run the snmp-agent remote-engineidusm-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.
For SNMPv2c, when a user with a level lower than the level configured using this command queries the securityname configured using the display this or display current-configuration command, the securityname is displayed as asterisks (******).
<sysname> system-view
[sysname] snmp-agent trap enable feature-name bgp
[sysname] snmp-agent target-host inform address udp-domain 192.168.0.1 params securityname 123 v2c
<sysname> system-view
[sysname] snmp-agent trap enable feature-name bgp
[sysname] snmp-agent target-host inform address udp-domain 1.1.1.1 params securityname 123 v2c notify-filter-profile abc