beautypg.com

Configuring the snmp agent to send traps to a host – H3C Technologies H3C SecPath F1000-E User Manual

Page 150

background image

139

To generate linkUp or linkDown traps when the link state of an interface changes, enable the linkUp or

linkDown trap function both globally by using the snmp-agent trap enable [ standard [ linkdown |
linkup ] * ] command and on the interface by using the enable snmp trap updown command.
After you enable a trap function for a module, whether the module generates traps also depends on the

configuration of the module. For more information, see the configuration guide for each module.
To enable traps:

Step Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enable the trap
function globally.

snmp-agent trap enable [bfd | bgp | configuration |
flash | 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 |

newmaster ] ]

Optional.
By default, only the trap
function of the voice

module is disabled. The

trap function of other
modules is enabled.

3.

Enter interface view.

interface interface-type interface-number N/A

4.

Enable link state
traps.

enable snmp trap updown

Optional.
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:

Step Command

Remarks

1.

Enter system view.

system-view

N/A