ICMP Monitor packet-size parameter to set the packet size

Description

ICMP Monitor should be able to test ICMP protocol using packet of arbitrary size.
Actually the dimension of the ICMP packet sent is 64 bytes including the ICMP header.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Antonio Russo January 7, 2012 at 4:05 AM

Matt, I'm running a full day test with packet-size=512.
And no trouble found, the graphs are ok and I have no exception either with JNA that with JNI.

The question is:

We need to set a minimum packet size. The question is where. Actually only ICMPMonitor has the ability to set the packet size as parameter, so we can add a control there to verify that the user set packet size is at least 64 Bytes (including ICMP(v4|v6) header excluding IP header).

On the other side seems to me reasonable to have this done in the Pinger implemented classes just because it is a general opennms platform requirement. So let me know what is your opinion and I can quickly work on this.

In my changes the *EchoRequest classes have all been changed to use a constructor where you have to declare the packetsize .
So I can add a control there:

if (packetsize < DEFAULT_PACKET_SIZE)
packetsize=DEFAULT_PACKET_SIZE;

and at the limit log a warn so the user is aware!

Matt Brozowski January 6, 2012 at 3:11 PM

We definitely use the contents for timing info as well as for identification info to match the replies to the requests and to distinguish opennms packets from other packets. Lots of data in there? At least 4 longs plus a header.

Benjamin Reed January 6, 2012 at 3:02 PM

Dunno if you saw my email, I reverted the changes in 1.8, 1.8 is frozen for all but critical bugfixes. Master is where these changes should be done at this point for future 1.11.

Minimum packet size makes sense to me, just wanted to be sure you were aware of it. I don't know the JICMP internals enough to be certain, I just seem to recall we used the payload for response-time stuff.

Antonio Russo January 6, 2012 at 2:46 PM

Ben,
we should set a min packet size that is 64 byte in lenght!

Antonio Russo January 6, 2012 at 2:45 PM

I've committed the changes in master and 1.8

To ssh://rssntn67@opennms.git.sourceforge.net/gitroot/opennms/opennms
e20e59c..48e3936 1.8 -> 1.8
0a1d675..31659d0 master -> master

Here is the relevant git log from 1.8:

commit 48e393687f52723273c6f42e2a11a3872273f561
Author: Antonio <rssntn67@yahoo.it>
Date: Fri Jan 6 20:39:01 2012 +0100

Changed the packet size parameter to packet-size

commit 90e83b60ee09415d767192525b4ba638e2025c1c
Author: Antonio <rssntn67@yahoo.it>
Date: Wed Jan 4 15:27:08 2012 +0100

Added support to set ICMP packet size

It is possible to specify the ICMP packet size
setting the parameter packetsize in poller
configuration file for the ICMP protocol
monitor

and the git log for master:

commit 31659d08abb55af7b8214f2fb1c6060371020d6b
Author: Antonio <rssntn67@yahoo.it>
Date: Fri Jan 6 20:31:43 2012 +0100

Fixed : ICMP Monitor set packet size

It is possible to include a parameter packet-size in
poller-configuration.xml to set the ICMP packet size.

<service name="ICMP" interval="30000" user-defined="false" status="on">
<parameter key="retry" value="2" />
<parameter key="timeout" value="3000" />
<parameter key="packet-size" value="512" />
<parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
<parameter key="rrd-base-name" value="icmp" />
<parameter key="ds-name" value="icmp" />
</service>

It is enhanced the Pinger interfaces and implemented classes to
get the packet size and send the ICMP packet of the requested
size.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created January 6, 2012 at 4:35 AM
Updated January 27, 2017 at 4:20 PM
Resolved January 6, 2012 at 2:45 PM