Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 12267  / 1 Year ago, fri, march 10, 2023, 12:47:02

I noticed that there is a timestamp option -T in the ping help. But I don't know how to use it.



I tried:



ping www.google.com -T


This is what I get:



Invalid timestamp type


What is the timestamp type and how do I use it?


More From » bash

 Answers
4

The -T option is used to ask hops to insert the timestamp in the IP packets upon receiving the ping. It works by using the TS option of IP packets, specified by RFC791.


ping -T requires an argument: one of tsonly, tsandaddr or tsprespec. You can read the manpage online or by running man ping for more information on the usage.


Here's an example of usage:


$ ping -T tsandaddr 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(124) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=3.22 ms
TS: 192.168.1.3 63668917 absolute
192.168.1.1 534841740 absolute not-standard
192.168.1.1 1 not-standard
192.168.1.3 3

64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=6.59 ms
TS: 192.168.1.3 63669919 absolute
192.168.1.1 534842745 absolute not-standard
192.168.1.1 0 not-standard
192.168.1.3 6

64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=3.20 ms
TS: 192.168.1.3 63670920 absolute
192.168.1.1 534843743 absolute not-standard
192.168.1.1 1 not-standard
192.168.1.3 3

^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.207/4.343/6.599/1.595 ms

Note that I've tried on my LAN. Some hops on the internet may reject IP packets with the timestamp option. (In fact, I cannot ping any internet host with -T, probably my ISP is rejecting my packets.)


[#16971] Saturday, March 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
armis

Total Points: 38
Total Questions: 106
Total Answers: 118

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;