0

Using the SNMP4J library I am able to successfully retrieve information from multiple agents using SNMP over UDP. I am running into a situation where I need to retrieve information from an agent using SNMP over TCP. The SNMP4J library provides a DefaultTcpTransportMapping class to do this and I believe I've implemented it appropriately. Using Wireshark, I see response packets being returned from the agent running SNMP over TCP but I am getting null response PDUs. What other considerations do I need to address when implementing SNMP over TCP instead of UDP? Any help is greatly appreciated!

After a discussion with the board's manufacturer we've learned that the model for communication is SNMP over PMPP over TCP and I'm working on a custom SNMP4J transport to handle this model.

Casey Murray
  • 1,582
  • 17
  • 21

1 Answers1

1

try to increase timeout value, TCP is slower than udp

UserTarget target = new UserTarget();
target.setTimeout(timeoutInMillis);
tomm
  • 182
  • 1
  • 3
  • 14
  • Tom, good thought. I did try several different combinations of longer intervals and more retries per session with no success. – Casey Murray Feb 17 '14 at 14:01
  • Although there were many other adjustments necessary to the transport before we got it working, including building a custom transport since we eventually discovered that the model is TCP over PMPP, in the last steps it was a (drastic) increase in the timeout that we needed to get a response - thanks tomm! – Casey Murray Mar 04 '14 at 18:45