Skip to content
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

Feature request: support ICMP type 13/14 timestamps #265

Closed
moeller0 opened this issue Sep 20, 2022 · 6 comments
Closed

Feature request: support ICMP type 13/14 timestamps #265

moeller0 opened this issue Sep 20, 2022 · 6 comments

Comments

@moeller0
Copy link

Sometimes for debugging it is helpful to get an idea about one way delays (or even just changes in one way delays). However the amount of servers willing to serve precise time (e.g. NTP servers) is quite low, not well distributed over the internet and often only willing to reply at low packet rates. However quite a number of publicly reachable servers are willing to respond to ICMP timestamps requests with the appropriate response. It would be excellent if fping could grow the capability to use ICMP timestamps instead of ICMP (caveat, ICMP over IPv6 tends not to support ICMP timestamps, but with large parts of the internet being IPv4 that still keeps ICMP timestamps relevant).

@lynxthecat
Copy link

lynxthecat commented Sep 20, 2022

I would like to second this request. In addition to the excellent reasons provided above, I think this would serve to yet further increase the attractiveness of fping set against the other existing ping utilities which either: offer it but are buggy (e.g. nping); offer it but are no longer maintained (e.g. hping3); or do not even offer it (e.g. iputils-ping). ICMP type 13 requests remain a powerful tool for ascertaining not only RTT, but also its constituent one way delays between the client and the server.

@gsnw-sebast
Copy link
Collaborator

gsnw-sebast commented Aug 10, 2024

Does anyone know a host that supports ICMP type 13/14 or does anyone know a way to test this with 127.0.0.1?

[1] Page-16: https://www.rfc-editor.org/rfc/rfc792.html

@moeller0
Copy link
Author

moeller0 commented Aug 11, 2024

I believe that 9.9.9.9 supports ICMP timetamps:

user@mac~ % sudo hping3 9.9.9.9 --icmp --icmp-ts -c 1
Password:
HPING 9.9.9.9 (utun4 9.9.9.9): icmp mode set, 28 headers + 0 data bytes
len=40 ip=9.9.9.9 ttl=56 id=12218 icmp_seq=0 rtt=43.0 ms
ICMP timestamp: Originate=65378647 Receive=65378771 Transmit=65378771
ICMP timestamp RTT tsrtt=43


--- 9.9.9.9 hping statistic ---
1 packets tramitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 43.0/43.0/43.0 ms

In addition my OpenWrt based router (192.168.42.1) also responds:

user@mac~ % sudo hping3 192.168.42.1 --icmp --icmp-ts -c 1
HPING 192.168.42.1 (en7 192.168.42.1): icmp mode set, 28 headers + 0 data bytes
len=46 ip=192.168.42.1 ttl=64 id=5322 icmp_seq=0 rtt=0.6 ms
ICMP timestamp: Originate=65527301 Receive=65527396 Transmit=65527396
ICMP timestamp RTT tsrtt=0


--- 192.168.42.1 hping statistic ---
1 packets tramitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.6/0.6/0.6 ms

This also shows the limits of the timestamps 1ms granularity, but on the plus side they allow one-way-delay measurements against quite a number of DNS servers n the open internet...

@lynxthecat
Copy link

lynxthecat commented Aug 11, 2024

@gsnw-sebast
Copy link
Collaborator

gsnw-sebast commented Sep 23, 2024

Development can be viewed at pull-request #353

@gsnw-sebast
Copy link
Collaborator

Merge done can be tested under develop branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants