On 2022-12-09, Byron Klippert <byronklipp...@ml1.net> wrote: > Hello, > > I get an snmp protocol error response when attempting to `snmp get` certain > OIDs on various devices. However `tcpdump` shows that the device is actually > responding with the anticipated result but it appears snmp isn't able to > parse the response correctly? Any suggestions on how to troubleshoot further > are welcome. > > > I'm requesting the mntrFreq OID which is formatted as such: > Name: mntrFreq > OID: .1.3.6.1.4.1.35833.12.3.1 > MIB: DB7000-MIB > Syntax: INTEGER32 (87100..108100) > Access: read-only > Status: current > DefVal: > Indexes: > Descr: "mntr Freq"
btw, the information in the mib file doesn't necessarily correspond to what the device actually sends, "snmp get" doesn't care about the mib file at all, just whether the pdu is correctly formatted. > imac:/home/admin $ snmp get -v 2c -r 0 -c *redacted* udp:paint-receiver:161 > .1.3.6.1.4.1.35833.12.3.1.0 > snmp: get: Protocol error > > imac:/home/admin $ doas tcpdump host paint-receiver > tcpdump: listening on bge0, link-type EN10MB > 10:10:02.804614 192.168.0.4.21246 > paint-receiver.snmp: C=*redacted* > GetRequest(32) E:35833.12.3.1.0 > 10:10:03.231863 paint-receiver.snmp > 192.168.0.4.21246: C=*redacted* > GetResponse(40) E:35833.12.3.1.0=103500 It might be useful to use -X to do a hexdump (and maybe -s1500 to make sure you get full packets); if you need to redact the snmp community (although it probably doesn't really matter all that much seeing as it's on a private lan address) make sure you get the hex digits too That way we can get a better idea of what's actually sent on the wire -- Please keep replies on the mailing list.