5

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.

6

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 or warmstart) 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:

  1. your network device needs to be able to send SNMP traps with a customized OID
  2. your SNMP trap handler has to be configured to properly handle these customized traps

Since it's often hard to arrange these two things, one of the RFC-defined traps (like the ones jonathanjo mentioned) is commonly used.

4

I believe it's customary to set up a loopback interface and then shutdown and no shutdown it.

At least some devices support a specific command to send a trap to test things, but I don't believe Cisco has a specific test trap to send.

test snmp trap snmp { authentication | coldstart | linkup | linkdown | warmstart } 

Taken from https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/snmp/command/nm-snmp-cr-book/nm-snmp-cr-s6.html#wp8026600260

  • Yes, I'm able to send traps (see the Junos equivalent of your command in my question). I'm asking whether there is a specific trap to send. – Jacktose Nov 29 '18 at 19:41
  • 3
    I don't believe there's a special test trap for this, only simulated and real ways of sending the standard traps. – jonathanjo Nov 29 '18 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.