Setting Max Packet Size for GetBulk Response

Hi, I am new to SNMP and SNMP4j library. We have a simple SNMP agent (supporting both snmpv2c and v3 over UDP) written using SNMP4j library. And there is an NMS that sends GetBulk requests for a set of OIDs towards agent. But there is a restriction at the NMS that it has the MTU set to 1500 bytes and the ‘don’t fragment’ bit is set to true. We don’t have an option to change the MTU size or the ‘don’t fragment’ bit.

So, I wanted to know if there is some option/feature in the SNMP4j library where I can set the max packet size for GetBulk PDU responses and still handle the lexicographic ordering of the response PDUs.

You can use DefaultUdpTransportMapping.setMaxInboundMessageSize the set the maximum message size you want to support (use) with that transport mapping.