Wednesday, June 27, 2012


snmptrap -v 1 -c public 3 0 ''


-v 1: version 1
-c public: use community string "public" trap manager's IP address (trap destination) enterprise (i.e. type of device/object generating trap, default to system ID in mib II, can be empty) trap source IP address (device's IP address)
3: generic trap ID, they are:
  • coldStart(0),
  • warmStart(1),
  • linkDown(2),
  • linkUp(3),
  • authenticationFailure(4),
  • egpNeighborLoss(5),
  • enterpriseSpecific(6)

0: specific trap ID, 0 when generic trap ID is not 6
'': system up time (timestamp)

You can also add "mib type value" to the end of the command to send them along with the trap

v2 trap:
snmptrap -v 2c -c public ""

"": system Uptime (when given as empty "", the system finds itself) trap OID

again, add "mib type value" to the end if you want.

v3 trap:

snmptrap -v 3 -a SHA -A 1234567890 -x DES -X 1234567890 -l authPriv -u myuser -e "123abc" "" linkUp.0