Saturday 19 October 2013

Java SNMP Trap Sender and Receiver using SNMP4j Open Source library

Objective

To write a SNMP Trap Receiver (for v1, v2c and v3) and Sender in Java using SNMP4j Open Source library.

Environment

Eclipse IDE
Java 7
SNMP4j library (snmp4j-2.2.2.jar, can be downloaded from Net)

Development

Testing

Thank You!

6 comments:

  1. thanks for snmp4j trap receiver.

    ReplyDelete
  2. If AES192, AES256 and few other protocols not working for you:

    The default Java supports strong but limited cryptography because of import control restrictions of some countries. You will have to apply unlimited strength JCE to have the program run without any exception.
    Please search for String JCE in oracle site and you will get the respective download/instructions for your java version.

    ReplyDelete
    Replies
    1. "String JCE" to be corrected as "Strong JCE"

      Delete
  3. Not able to receive SecurityLevel.Auth_Priv and SecurityLevel.AUTH_NOPRIV
    SNMPv3 Traps.

    ReplyDelete
    Replies
    1. I added examples of AUTHPRIV, can you please check:
      SNMPTrapGeneratorClient2.java
      SNMPTrapReceiver2.java

      Delete