-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Use separate ICMP identifier and sequence to remove 65k ping limit #385
Comments
Practical test cases (current limits)The following simple tests demonstrate the current 65k sequence limit in
This shows that the total number of pings Real-world needIn a real monitoring scenario, I need to probe about 30,000 hosts with multiple repetitions, for example using
This confirms that the current sequence ID limitation prevents using I kindly ask the maintainers to consider this enhancement, as it would significantly improve |
Thanks for this feature request! Have you considered using many Currently, It may be possible to use an option to select a change similar to your proposal. The active sequence number count is limited to If we want to have 30000 or more targets with different ICMP IDs, we would probably need to just assign them sequentially. We might also need one |
Thanks for the detailed explanation — really helpful! Here's what I took from it, along with a few thoughts:
|
After thinking about this a bit more, I am leaning towards adding an option to specify the sequence number timeout as the simplest possible solution. Combining that with Automatically adjusting the sequence number timeout to the maximum probe timeout might also work, but I am not sure about possible side effects and regressions. GitHub issue #32 shows how problematic such changes can be. Since the timeout depends on several options, and by default involves exponential back-off, this is also more complex to implement than allowing the user to provide a number. For now, I do not intend to look into using a different ICMP identifier for different targets. One ICMP ID per target would limit |
Enhancement: Support for extended ICMP (identifier + sequence) tracking to overcome 65k sequence limit
Currently,
fping
uses a single global 16-bit sequence map (FPING_SEQMAP_SIZE
) to track ICMP responses. This imposes a hard limit of approximately 65,535 totalhosts × count
combinations per run.For example, it is possible to monitor up to 65,535 hosts with
-C1
, but increasing to-C2
immediately exceeds this limit.However, the ICMP Echo protocol defines two separate 16-bit fields:
identifier
(typically per host)sequence
(typically per probe)By assigning a unique
identifier
per target host and using thesequence
field per probe (e.g., for-C
count), it becomes possible to scalehost × count
combinations into the range of 2³², fully within the ICMP specification.This change would allow monitoring up to 65,535 hosts with options like
-C60
or higher — a major benefit for ISPs and large-scale network monitoring systems.Suggested implementation:
identifier
(16-bit) to each target host.-C
), increment only thesequence
field (also 16-bit).(identifier << 16) | sequence
.This replaces the current single 16-bit sequence-based tracking, and enables proper handling of 65,000+ targets even with repeated pings (e.g.
-C60
).I'd be happy to help test this in a high-scale environment or submit a prototype patch.
The text was updated successfully, but these errors were encountered: