I want to send a test trap from a router, just to make sure SNMP is set up correctly, the server is receiving traps, etc. I could use some innocuous or irrelevant trap, but is there a specific trap OID to send in this case? One that's meant for tests, examples, or other dummy uses?
I'm using request snmp spoof-trap
on Junos, but I'm curious about any standard or proprietary traps.
Best Answer
As jonathanjo said in his answer and the comments afterwards, there are no special test traps for testing connectivity. Often, one of the RFC-defined traps (like
linkup
,linkdown
orwarmstart
) is used.However, there is also MIB
1.3.6.1.4.1.8072.9999.9999
, named netSnmpPlaypen. It was introduced by the net-SNMP project as a playground environment to introduce traps which only have meaning within your own network.You could consider picking an OID within that MIB and using that to test if SNMP traps are working. However, two things are required then:
Since it's often hard to arrange these two things, one of the RFC-defined traps (like the ones jonathanjo mentioned) is commonly used.