GetRequestMessage doesn't reply correctly while GetNextRequestMessage does with #SNMP

184 views Asked by At

I've been working with #SNMP library lately. My problem is whenever I send a GET request to an agent it replies with NoSuchObject ,however when I tried GETNEXT or GETBULK request it worked just fine. I literally did the same as examples codes do at github. I wonder why GET request didn't work while GETNEXT did.

2

There are 2 answers

0
yogev levi On BEST ANSWER

the OID you try to GET ends with .0? GETNEXT does not need to end with .0 but for using GET you must identify the OID as a leaf. I'm guessing you just need to be more specific

0
Lightness Races in Orbit On

Those are two completely different SNMP operations.

When you GET an object, the object must exist otherwise you get NoSuchObject.

When you GETNEXT an object, you get the first object that exists after the OID you specified.

You should brush up on your SNMP knowledge before attempting to implement a manager.