# Configure snmpd.conf to enable traps



## nazari (Aug 7, 2014)

I installed SNMP and want to enable BGP traps in FreeBSD9.2. I added this to the configuration file snmpd.conf to receive traps:

```
trapcommunity  public
trapsink  localhost public
monitor  -r 60 -e linkUpTrap    "Generate TRAP-linkUp"   ifOperStatus != 2
```
*I*t works (every time one interface goes up, the linkUpTrap is sent).

*M*y problem is: I want to enable BGP Trap and load BGP4-MIB and bgpTraps (OID: 1.3.6.1.2.1.15.7) that consist of two traps bgpEstablished and bgpBackwardTransition. Expected-Values of this trap are bgpPeerLastError and BgpPeerState.

I think BgpPeerState=6 means bgpEstablished trap sent.

```
monitor  -r 60 -e BGPestablishTrap    "Generate TRAP-bpg"   BgpPeerState == 6
```

But how to check that the Backward-trans trap happens? *A*nd how to configure with the monitor command? And another trap such as RSVP, PIM, ...

Thanks a lot for your answer.


----------

