How do I set the maximum message size when using snmp v2 in PHP?
I am using PHP to do an SNMP walk of devices, and my organization has very stringent firewalls in place. I am running into an issue where (snmp2_real_walk, or snmp2_walk) are resulting in timeouts from my production server if the packets are larger and getting fragmented. I'm wondering if there is a way to set the maximum packet size to something smaller to prevent fragmentation.
I am using php 5.4.10 on Ubuntu 12.04, and Net-SNMP 5.4.3.
When I capture the traffic, it turns out the snmp2_real_walk is using getBulkRequest. I get a response that is saying the packet is fragmented, and a smaller follow up packet. On my local machine, same environment aside from firewall, this works. On my production machine, it's failing.
var_dump(snmp2_real_walk("a.b.c.d", "public", '.o.i.d'));
If I call it via command line, it works with smaller packets. I don't understand why. There has to be a way to set the packet/message size, right?
snmpbulkwalk -v2c -cpublic a.b.c.d .o.i.d
(sensitive data removed).