SNMP

jdavidb on 2006-03-15T19:26:01

I'm still having my SNMP problem (and after yesterday, I'm not really any closer than I was on Monday. Today I'm trying every other SNMP module I can find, and any other ideas I have. If it doesn't work by the end of the day, I'm going to forget using the module and just parse the output of the snmpwalk command. Sigh.

Presently I think I'm installing an alternative module to Net::SNMP which will actually talk directly to the same library that snmpwalk uses. I suppose Net::SNMP is a pure Perl implementation of the protocol.

I did discover that when I try to do what snmpwalk does, which I think consists of repeated calls to get_next_request, it simply skips this Counter64 value (I should get the MIB that points at it returned at some point, but I never do; it simply returns the next non-Counter64 value), while when I pass in that MIB directly to get_request, it gives me this error: "Received noSuchName(2) error-status at error-index 1." Whatever that is.


What version?

Mr. Muskrat on 2006-03-15T20:31:01

I too am trying to wrap my head around SNMP. What version are you using: 1, 2, 3? It sounds quite a bit like you are SNMPv2 when using snmpwalk but SNMPv1 when using Perl. Version 1 doesn't know about Counter64's and it does in fact return noSuchName when it is asked for one. See RFC2089, Mapping SNMPv2 onto SNMPv1 within a bi-lingual SNMP agent. Specifically bullet point 2 under both Section 3.1 Processing an SNMPv1 GET request and Section 3.2 Processing an SNMPv1 GETNEXT request.

Re:What version?

jdavidb on 2006-03-15T21:40:30

Hmmm, I was pretty sure it was version 2 (or version 2c???) for both, but you raise a good point that I should check that. Thank you.

Re:What version?

jdavidb on 2006-03-15T21:43:56

THANK YOU!!!!!! That was my problem!!!

Net::SNMP defaults to version 1. I'm using version 2 with snmpwalk. (Actually apparently the formal name is 2c, but Net::SNMP names it "2".)

I had only thought to be explicit about the version with snmpwalk, which wanted to use 3 by default and failed to work at all, with noisy error messages. Using 1 only silently failed for the Counter64's.

I owe you a drink sometime, but since I don't buy alcohol, maybe we'll make it a soda and a burger. :) Thank you so much for resolving this for me.

Re:What version?

Mr. Muskrat on 2006-03-16T02:12:00

Glad I could help. I work in Irving near 161 and 114, perhaps we can do lunch sometime.

Re:What version?

jdavidb on 2006-03-16T15:37:04

Wow; yeah. Didn't realize you were in the area. I definitely owe you lunch, so we'll have to arrange that at some point.