etingof / snmpsim

SNMP Simulator

Home Page:http://snmplabs.com/snmpsim/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snmpsim does not handle 65535 bytes length supported by OctetString data type

asapryka opened this issue · comments

According to documentation found across web OctetString length can vary from 0 to 65535 bytes, so I expected snmpsim to support OIDs of OctetString data type and its value equal to 65535 bytes.
Instead, snmpsim does not allow to get such a value from the OID by snmpget or snmpwalk. It times out ignoring the OID. I was able to get a value of 64900 bytes though.

Are you saying that you can get an OctetString value of length up to 64900, but starting from 64901 up no response is produced? Do you see anything in SNMP simulator log?

Keep in mind that entire SNMP packet has to fit UDP datagram which is capped by 65535 bytes, if memory serves. There is some overhead such as SNMP message framing and OID to take some space. Not 635 bytes though...

I'm not saying 64900bytes is the boundary value, it's just the approximate maximum I could get.
I've just googled the UDP datagram and it appears that:
"However the actual limit for the data length, which is imposed by the underlying IPv4 protocol, is 65,507 bytes (65,535 − 8 byte UDP header − 20 byte IP header).".
Thanks for the information and a great tool.