Introduction
Writing a Java MIB browser : Using introduced concepts Different tools (ANTLR, JDMK)
MIB Browser Application
Global structure
SMICNG :
Converts RFC to a specific format (MOSY)
SMICNG
ANTLR
ANTLR :
Parser, creates data structures
JDMK
JDMK
Sun Toolkit Agents and Managers Provides an API for accessing :
SNMP HTTP, HTTPS, RMI Scheduling, Monitoring
JDMK SNMP
Very simple to use SNMP V1 to V3 Synchronous or Asynchronous Classes to describe requests, MIB objects, MIB OIDs etc Browsable Javadoc with the API Can be used for agents or managers
Warning : Bug in the 1.1 compiler
SyncManager.java
Create a peer
SnmpPeer agent = new SnmpPeer(host, Integer.parseInt(port)); SnmpParameters params = new SnmpParameters("public", "private"); agent.setSnmpParam(params);
Allows to generate requests on multiple OIDs Generally used with only one element
My MIB-Browser
Can load different RFC files
Need to be converted in MOSY by SmicNG
Get, GetNext and Set Set was not tested Written in Java (architecture independent)
Issues
Table indexes: when to update ? String and physical addresses Problem of display on some OS or for remote connection.
Evolution / Conclusion
Parse RFC directly (get rid off SmicNG) Support for trap messages Support for SNMP V3
Easier to implement than expected Versatility of JDMK
Exam questions ?
What tools can be used to make SNMP requests in Java ? How would you differentiate real strings from physical addresses if you had to implement a MIB Browser ?