R3303-HP HSR6800 Routers Network Management and Monitoring Configuration Guide
92
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enable traps
globally.
snmp-agent trap enable [ acfp [ client | policy | rule |
server ] | bfd | bgp | configuration | default-route |
flash | fr | mpls | ospf [ process-id ] [ ifauthfail |
ifcfgerror | ifrxbadpkt | ifstatechange | iftxretransmit |
lsdbapproachoverflow | lsdboverflow | maxagelsa |
nbrstatechange | originatelsa | vifcfgerror | virifauthfail
| virifrxbadpkt | virifstatechange | viriftxretransmit |
virnbrstatechange ] * | pim [ candidatebsrwinelection |
electedbsrlostelection | interfaceelection |
invalidjoinprune | invalidregister | neighborloss |
rpmappingchange ] * | standard [ authentication |
coldstart | linkdown | linkup | warmstart ] * | system |
vrrp [ authfailure | ne
wmaster ] ]
Optional.
By default, the trap
function of modules is
enabled globally.
3. Enter interface view.
• interface interface-type interface-number
• controller { cpos | e1 | e3 | e-cpos | t1 | t3 } number
Use either command
depending on the
interface type.
4. Enable link state
traps.
enable snmp trap updown
By default, the link
state traps are
enabled.
Configuring the SNMP agent to send traps to a host
The SNMP module buffers the traps received from a module in a trap queue. You can set the size of the
queue, the duration that the queue holds a trap, and trap target (destination) hosts, typically the NMS.
To successfully send traps, you must also perform the following tasks:
• Complete the basic SNMP settings and verify that they are the same as on the NMS. If SNMPv1 or
SNMPv2c is used, you must configure a community name. If SNMPv3 is used, you must configure
an SNMPv3 user and MIB view.
• Make sure the device and the NMS can reach each other.
To configure the SNMP agent to send traps to a host:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Configure a target host.
snmp-agent target-host trap
address udp-domain { ip-address |
ipv6 ipv6-address } [ udp-port
port-number ] [ vpn-instance
vpn-instance-name ] params
securityname security-string [ v1 |
v2c | v3 [ authentication |
privacy ] ]
To send the traps to the NMS, this
command is required, and you
must specify the ip-address
argument as the IP address of the
NMS.
3. Configure the source address
for traps.
snmp-agent trap source
interface-type { interface-number |
interface-number.subnumber }
Optional.
By default, SNMP chooses the IP
address of an interface to be the
source IP address of traps.