I'm just checking the network latency with different tools e.g. with hping3
:
sudo hping3 -A -n -p 80 www.google.ro
HPING www.google.ro (ppp0 172.217.20.3): A set, 40 headers + 0 data bytes
len=40 ip=172.217.20.3 ttl=59 id=14578 sport=80 flags=R seq=0 win=0 rtt=23.7 ms
len=40 ip=172.217.20.3 ttl=59 id=60364 sport=80 flags=R seq=1 win=0 rtt=23.2 ms
len=40 ip=172.217.20.3 ttl=59 id=28510 sport=80 flags=R seq=2 win=0 rtt=22.8 ms
len=40 ip=172.217.20.3 ttl=59 id=38493 sport=80 flags=R seq=3 win=0 rtt=22.4 ms
len=40 ip=172.217.20.3 ttl=122 id=35817 sport=80 flags=R seq=4 win=0 rtt=25.7 ms
len=40 ip=172.217.20.3 ttl=122 id=8842 sport=80 flags=R seq=5 win=0 rtt=20.5 ms
^C
--- www.google.ro hping statistic ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 20.5/23.1/25.7 ms
and with ping
:
ping www.google.ro
PING www.google.ro (172.217.20.3) 56(84) bytes of data.
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=1 ttl=56 time=16.3 ms
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=2 ttl=56 time=17.1 ms
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=3 ttl=56 time=16.9 ms
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=4 ttl=56 time=16.5 ms
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=5 ttl=56 time=16.3 ms
64 bytes from bud02s28-in-f3.1e100.net (172.217.20.3): icmp_seq=6 ttl=56 time=16.3 ms
^C
--- www.google.ro ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 16.365/16.613/17.105/0.341 ms
After a few series with these 2 commands I noticed that hping3
is always reporting a higher latency than ping
. Why this happens and how could one fix it?
PS: using Ubuntu 16.04.5 LTS (directly connected to Internet) and UFW (ver. 0.35)