Enabling snmp traps, Configuring the snmp agent to send traps to a host – H3C Technologies H3C MSR 50 User Manual

Page 20

Advertising
background image

Enabling SNMP traps

Enable SNMP traps only if necessary. SNMP traps are memory-intensive and might affect device

performance.
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

19.

Enter system view.

system-view

N/A

snmp-agent trap enable [ acfp [ client | policy | rule |

server ] | bfd | bgp | configuration | default-route |
flash | fr | isdn [ call-clear | call-setup | lapd-status ] |

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 ] * | posa | standard [ authentication

| coldstart | linkdown | linkup | warmstart ] * | system

| voice dial | vrrp [ authfailure | newmaster ] | wlan ]

By default, the trap
function of the voice

module is disabled

and the trap functions
of all the other modules

are enabled.

20.

Enable traps
globally.

Use either command
depending on the
interface type.

interface interface-type interface-number

21.

Enter interface view.

controller { cpos | e1 | e3 | e-cpos | t1 | t3 } number

By default, the link
state traps are

enabled.

22.

Enable link state
traps.

enable snmp trap updown

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:

7

Advertising