Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

There are several articles in the literature that warn against using ping/ICMP measurements  compared to TCP and UDP measurements. See for example:

...

For example we could use the command:

Code Block
460cottrell@pinger:~$sudo hping3 -p 80 -c 2 -S www.google.com
[sudo] password for cottrell:
HPING www.google.com (eth0 172.217.14.100): S set, 40 headers + 0 data bytes
len=46 ip=172.217.14.100 ttl=50 id=44206 sport=80 flags=SA seq=0 win=42780 rtt=10.0 ms
len=46 ip=172.217.14.100 ttl=50 id=24818 sport=80 flags=SA seq=1 win=42780 rtt=9.8 ms
--- www.google.com hping statistic ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 9.8/9.9/10.0 ms
or
476cottrell@pinger:~$sudo nping -c 2 --tcp -p 80 www.google.com
Starting Nping 0.5.51 ( http://nmap.org/nping ) at 2018-01-13 15:05 PST
SENT (0.0173s) TCP 134.79.104.80:36386 > 172.217.14.100:80 S ttl=64 id=19801 iplen=40  seq=790870282 win=1480
RCVD (0.0274s) TCP 172.217.14.100:80 > 134.79.104.80:36386 SA ttl=50 id=43697 iplen=44  seq=610794609 win=42780 <mss 1380>
SENT (1.0178s) TCP 134.79.104.80:36386 > 172.217.14.100:80 S ttl=64 id=19801 iplen=40  seq=790870282 win=1480
RCVD (1.0276s) TCP 172.217.14.100:80 > 134.79.104.80:36386 SA ttl=50 id=44487 iplen=44  seq=626421474 win=42780 <mss 1380>
Max rtt: 9.827ms | Min rtt: 9.613ms | Avg rtt: 9.720ms
Raw packets sent: 2 (80B) | Rcvd: 2 (92B) | Lost: 0 (0.00%)
Tx time: 1.00076s | Tx bytes/s: 79.94 | Tx pkts/s: 2.00
Rx time: 2.00249s | Rx bytes/s: 45.94 | Rx pkts/s: 1.00
Nping done: 1 IP address pinged in 2.03 seconds
or 
486cottrell@pinger:~$sudo nping -p 80 -c 2 -6 --tcp-connect 2001:da8:270:2018:f816:3eff:fef3:bd3
Starting Nping 0.5.51 ( http://nmap.org/nping ) at 2018-01-13 15:21 PST
SENT (0.0021s) Starting TCP Handshake > 2001:da8:270:2018:f816:3eff:fef3:bd3:80
RECV (0.1679s) Handshake with 2001:da8:270:2018:f816:3eff:fef3:bd3:80 completed
SENT (1.0041s) Starting TCP Handshake > 2001:da8:270:2018:f816:3eff:fef3:bd3:80
RECV (1.1692s) Handshake with 2001:da8:270:2018:f816:3eff:fef3:bd3:80 completed
Max rtt: 165.789ms | Min rtt: 165.073ms | Avg rtt: 165.431ms
TCP connection attempts: 2 | Successful connections: 2 | Failed: 0 (0.00%)
Tx time: 1.00329s | Tx bytes/s: 159.48 | Tx pkts/s: 1.99
Rx time: 1.16836s | Rx bytes/s: 68.47 | Rx pkts/s: 1.71
Nping done: 1 IP address pinged in 1.17 seconds

We Together with this we  could use the list of PingER www hosts that respond to pings. Note that sometimes pings are blocked to a host but TCP port 80 packets work, e.g. adl-a-ext1.aarnet.net.au (202.158.195.68).

Project

We wrote a script ping-vs-tcp.pl. 

Code Block
Usage:   ping-vs-tcp.pl [opts]
        Opts:
        -v print this USAGE information
        -D debug_level (default=0)
        -p protocol (6 or '') (default '')
Function:
  Ping the host provided in %NODE_DETAILS
  For each host it gets the IP address either from NODE_DETAILS (IPv4)
  or using the dig command (IPv6).
  it then Pings and npings the host and gathers the min, average, maximum
  RTTs and losses and reports them to STDOUT. together with host information
  such as name, IP address, contry, region etc.
Input:
  It gets information on the PingER hosts from %NODE_DETAILS using:
  require '/afs/slac/package/pinger/nodes.cf';
Examples:
 ping-vs-tcp.pl
 ping-vs-tcp.pl -f top-uni.txt
 ping-vs-tcp.pl -p 6
 ping-vs-tcp.pl -v -D 1