[SNMP4J] SNMP v3 GETBULK messages

Gareth Howard gareth2009 at googlemail.com
Fri Apr 25 12:07:54 CEST 2008


Hi,
I'm having problems getting GETBULK messages to work under SNMP4J using
SNMPv3.

I've modified the SnmpRequest class as follows:

    public SnmpRequest(String[] arg) {
        String[] args = {
            "-v","3",
            "-u","user1",
            "-Cn","0",
            "-Cr","10",
            "-p","GETBULK",
            "-n","DefaultContextName",
            "udp:192.168.55.1/161",
            "1"
        };
    .....
    }

I would expect this to return the first 10 items in the MIB, which is what
happens when I provide the same arguments to the command line tools in the
NetSnmp library. Instead i'm getting the following output from SnmpRequest:

25-Apr-2008 10:36:55 org.snmp4j.log.JavaLogAdapter log
INFO: UDP receive buffer size for socket 172.29.3.125/0 is set to: 8192
25-Apr-2008 10:36:55 org.snmp4j.log.JavaLogAdapter log
WARNING: 1.3.6.1.6.3.15.1.1.4.0 = 1
25-Apr-2008 10:36:56 org.snmp4j.log.JavaLogAdapter log
WARNING: 1.3.6.1.6.3.15.1.1.4.0 = 2

Using ethereal to examine the packets being sent and received shows a SNMPv3
GETBULK packet being sent, but no Varbinds are present. Below is the UDP
payload from the packet sent:

0000   00 0c c6 00 c0 14 00 0a 5e 4b c9 62 08 00 45 00  ........^K.b..E.
0010   00 6b ac 9a 00 00 80 11 9e 93 c0 a8 37 02 c0 a8  .k..........7...
0020   37 01 05 94 00 a1 00 57 4f 87 30 4d 02 01 03 30  7......WO.0M...0
0030   11 02 04 44 10 47 73 02 03 00 ff ff 04 01 04 02  ...D.Gs.........
0040   01 03 04 10 30 0e 04 00 02 01 00 02 01 00 04 00  ....0...........
0050   04 00 04 00 30 23 04 00 04 12 44 65 66 61 75 6c  ....0#....Defaul
0060   74 43 6f 6e 74 65 78 74 4e 61 6d 65 a5 0b 02 01  tContextName....
0070   00 02 01 00 02 01 0a 30 00                       .......0.
Any help with this would be much appreciated.

Best regards,

Gareth



More information about the SNMP4J mailing list