[SNMP4J] Problem getting any sort of response from CMTS

Mathew Rowley mathew_rowley at cable.comcast.com
Tue Feb 10 16:32:33 CET 2009


The only interaction I have ever done with an SNMP interface has been using
command line applications to do SNMP walks.  That said, I am trying to get
statistics from a CMTS ­ specifically cable modem MAC addresses, and link
states.  When sending a trap to the CMTS, I can see on the CMTS that I am
getting an error:

007267: *Feb 10 13:31:45.091: SNMP: Packet received via UDP from
68.87.35.143 on GigabitEthernet0/1
007268: *Feb 10 13:31:45.095: SNMP: Get request, reqid 2115058581, errstat
0, erridx 0 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007269: *Feb 10 13:31:45.095: SNMP: Response, reqid 2115058581, errstat 2,
erridx 1 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007270: *Feb 10 13:31:45.099: SNMP: Packet sent via UDP to 68.87.35.143
007271: *Feb 10 13:31:46.595: SNMP: Packet received via UDP from
68.87.35.143 on GigabitEthernet0/1
007272: *Feb 10 13:31:46.595: SNMP: Get request, reqid 2115058581, errstat
0, erridx 0 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007273: *Feb 10 13:31:46.599: SNMP: Response, reqid 2115058581, errstat 2,
erridx 1 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007274: *Feb 10 13:31:46.603: SNMP: Packet sent via UDP to 68.87.35.143
007275: *Feb 10 13:31:48.099: SNMP: Packet received via UDP from
68.87.35.143 on GigabitEthernet0/1
007276: *Feb 10 13:31:48.099: SNMP: Get request, reqid 2115058581, errstat
0, erridx 0 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007277: *Feb 10 13:31:48.099: SNMP: Response, reqid 2115058581, errstat 2,
erridx 1 
 cdxCmtsCmCpeObjects.8 = NULL TYPE/VALUE
007278: *Feb 10 13:31:48.103: SNMP: Packet sent via UDP to 68.87.35.143

And, form the logs, it seems like there is a response sent. Yet, the snmp4j
API has a null response.  I feel like I don¹t know enough about the type of
requests I can send (PDU.get, PDU.getnext, etc.) and that this may be one
reason things are not working.  The code I am using to send this trap is:

        Address targetAddress =
GenericAddress.parse("udp:10.252.74.164/161");        CommunityTarget target
= new CommunityTarget();        TransportMapping transport = new
DefaultUdpTransportMapping();        Snmp snmp = new Snmp(transport);
target.setCommunity(new OctetString("commstr"));
target.setAddress(targetAddress);        target.setRetries(2);
target.setTimeout(1500);        target.setVersion(SnmpConstants.version1);
// creating PDU        PDU pdu = new PDU();        pdu.add(new
VariableBinding(new OID("1.3.6.1.4.1.9.9.116.1.3.8.1.1")));
pdu.setType(PDU.GET);        // sending request        ResponseEvent resp =
snmp.send(pdu, target);        System.out.println(resp.getRequest());
System.out.println(resp.getResponse());
System.out.println(resp.getError());

With the output being (after what seems to be a timeout):

GET[requestID=1059114960, errorStatus=Success(0), errorIndex=0,
VBS[1.3.6.1.4.1.9.9.116.1.3.8.1.1 = Null]] null null

Any suggestions on what I am doing wrong?  Thanks.

-- 
MAT



More information about the SNMP4J mailing list