R3166-R3206-HP High-End Firewalls System Management and Maintenance Command Reference-6PW101

153
v2c: SNMPv2c. This keyword must be the same with the SNMP version on the NMS; otherwise, the NMS
cannot receive any trap.
v3: SNMPv3. This keyword must be the same with the SNMP version on the NMS; otherwise, the NMS
cannot receive any trap.
authentication: Specifies the security model to be authentication without privacy. Authentication is
a process to check whether the packet is integral and whether it has been tampered. You need to
configure the authentication password when creating an SNMPv3 user.
privacy: Specifies the security model to be authentication with privacy. Privacy is to encrypt the data
part of a packet to prevent it from being intercepted. You need to configure the authentication
password and privacy password when creating an SNMPv3 user.
Description
Use the snmp-agent target-host command to configure the related settings for a trap target host.
Use the undo snmp-agent target-host command to remove the current settings. According to the
networking requirements, you can use this command for multiple times to configure different settings for
a target host, enabling the device to send trap messages to different NMSs.
If udp-port port-number is not specified, port number 162 is used.
If the key words v1, v2 and v3 are not specified, v1 is used.
If the key words authentication and privacy are not specified, the authentication mode is no
authentication, no privacy.
Related commands: enable snmp trap updown, snmp-agent trap enable, snmp-agent trap source, and
snmp-agent trap life.
Examples
# Enable the device to send SNMPv1 traps to 10.1.1.1, using the community name of public.
<Sysname> system-view
[Sysname] snmp-agent trap enable standard
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname
public
# Enable the device to send SNMPv3 traps to the device with the IP address of 10.1.1.1, using the user
name of v3test.
<Sysname> system-view
[Sysname] snmp-agent trap enable standard
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 vpn-instance vpn1 params
securityname v3test v3
snmp-agent trap enable
Syntax
snmp-agent trap enable [ bgp | configuration | flash | ospf [ process-id ] [ ifauthfail | ifcfgerror |
ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa |
nbrstatechange | originatelsa | vifcfgerror | virifauthfail | virifrxbadpkt | virifstatechange |
viriftxretransmit | virnbrstatechange ] * | standard [ authentication | coldstart | linkdown | linkup |
warmstart ]* | system | vrrp [ authfailure | newmaster ] ]
undo snmp-agent trap enable [ bgp | configuration | flash | ospf [ process-id ] [ ifauthfail | ifcfgerror
| ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa |
nbrstatechange | originatelsa | v
ifcfgerror | virifauthfail | virifrxbadpkt | virifstatechange |