Network Management

Week 8, Mar 21
LT-412, Mon 4:15-6:45 pm



Java

We will use the Drexel University Java SNMP package.

snmpget.java

This is a mini-version of the snmpget command; it retrieves a single OID. It assumes localhost.
Review the code:
Note that although the documentation states that an OID is to convert to an int[], this in fact does not work; it must be long[].

Compiling and running:
    CLASSPATH=".:snmp.jar:$CLASSPATH"
    export CLASSPATH
    javac snmpget.java
    java snmpget arg

Demo on system group 1.3.6.1.2.1.1.x.0, 1.3.6.1.2.1.2.2.1.6.2

snmpgetnext.java
1.3.6.1.2.1.4.20 (should be an IP address)

tableget1.java

Demo of table retrieval. Here we use retrieveMIBTable, rather than getMIBEntry. The only difference is that we now retrieve a rather long SNMPVarBindList rather than one of length 1. Note makeArrayList(), not actually used.

What would you have to do to retrieve one row of this table?
What would you have to do to retrieve row i, column j?
What would you have to do to get a column? Assuming you did not know the dimensions of the table?
What would you have to do to get all the OID index values?

tableget2.java

Here I convert from SNMPVarBindList to ArrayList<SNMPSequence>. Also, printing is deferred until the end, and there is a printValue method that does some casting.




  Some NMS products:
   
    OpenNMS: 
    GroundWork
    Nagios
     
    lots of commercial ones
     
    Why open source? To get people to write app-specific modules!
     
Centralized v Distributed configurations
    Two basic strategies:
The latter can be leveraged into multi-layer management structures
    
 

   
Inter-AS routing: BGP
        complex administrative choices
        transit or no transit?
        Accept routes from neighbors (input selection)
        route selection?
        advertise chosen route to where? (output selection)
        Multi_exit_discriminator (MED)