I was using the following code.
iterator = bulkCmd(
SnmpEngine(),
credentials,
UdpTransportTarget((target_ip, 161), timeout=10, retries=1),
ContextData(),
0, 2,
ObjectType(ObjectIdentity(oid)),
lexicographicMode=False
)
In the process of troubleshooting why snmpv3 randomly times out when getting polled using the above code, i was noticing that using the values (0, 100) for example, When trying to poll a simple mib for say ifAlias, i would get all the ifAlias, But also parts of the next mib. For whatever reason it seems to cause the python script to get too many timeouts. Debugging in wireshark i was seeing it (The cisco switch) was replying with more than what i was asking for leading me to believe it's taking a bit too long to reply with what i was looking for. Is there a way to get PySNMP to just pull the mib itself and anything under that tree? I feel like i'm missing something stupid in the documentation.
Thanks in advance for any pointers.