2

Strange problem seen while querying a Cisco Call Manager via SNMP v3. SNMP v2 works fine.

When using get-next-request, the response is supposed to be a get-response, but from time to time I get a "report" response instead.

Reporting on an oid that's got nothing to do with the oid in the get-next-request.

Dump from wireshark could be provided if interesting. The oid in question is (phone update table):

1.3.6.1.4.1.9.9.156.1.2.4.0

Usually the response is a get-response with an oid similar to:

1.3.6.1.4.1.9.9.156.1.2.4.1.2.580

But every now and then the response is a "report" with oid:

1.3.6.1.6.3.15.1.1.2.0

My application (.net using sharpsnmplib) reads this as a regular get-response and get's all confused. SNMP v3 encryption and authorization seems to be all good. CUCM 10.5 and sharpsnmplib 7.6.

Aleksander Azizi
  • 9,829
  • 9
  • 59
  • 87
skjelland
  • 139
  • 2
  • 6

1 Answers1

3

You will have to spend some time learning SNMP v3, so as to understand what is the "discovery" process and why REPORT message is important.

IdNotInTimeWindow is just the OID 1.3.6.1.6.3.15.1.1.2.0, which usually means the time stamp in your request is already out of time window.

Your code should carefully handle such REPORT messages (resend the request based on the new time stamp in this REPORT message), though I will agree that #SNMP Library should provide better support on that (it's coming, in the next release).

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • The solution (in my case anyway) was to simply do a discovery process before each snmp v3 get command. This is a long-lived process, so I assumed that the discovery report could be used for a (long) period of time. Using the current version of the library, how could I identify that the get-response is actually a report? Or even better, how to find the time window from the report message so I can recreate only when neccessary ? Thanks for your support ;) – skjelland Oct 12 '14 at 18:51
  • Not easy though. `ISnmpMessage.Pdu().TypeCode` should tell which kind of response message is received, REPORT or RESPONSE. For either message received, you can use it as the last parameter to construct a new request message, such as `GetRequestMessage`. The time window information will be automatically utilized. – Lex Li Oct 13 '14 at 13:51