Determine fastest server using the Internet Control Message Protocol (ICMP).

Install netselect utility.

$ sudo apt install netselect

Display available parameters, please read manual page for details.

$ netselect 
Usage: netselect [-v|-vv|-vvv] [-I] [-m max_ttl] [-s servers] [-t min_tries] host ...

Display best server using ICMP to determine fastest server.

$ netselect -I  8.8.8.8 8.8.4.4 1.1.1.1 94.140.14.14 94.140.15.15
35 8.8.8.8

Display top five servers (the lower score is better).

$ netselect -I -s 5 8.8.8.8 8.8.4.4 1.1.1.1 94.140.14.14 94.140.15.15
35 8.8.8.8
   35 8.8.4.4
   78 1.1.1.1
   87 94.140.15.15
  100 94.140.14.14

Display useful details.

$ netselect -I -vv -s 0 8.8.8.8 8.8.4.4 1.1.1.1 94.140.14.14 94.140.15.15
Running netselect to choose 0 out of 5 addresses.       
...............................................................
8.8.8.8                                 17 ms  12 hops  100% ok (10/10) [   37]
8.8.4.4                                 16 ms  12 hops  100% ok (10/10) [   35]
1.1.1.1                                 34 ms  13 hops  100% ok (10/10) [   78]
94.140.15.15                            35 ms  15 hops  100% ok (10/10) [   87]
94.140.14.14                            38 ms  15 hops   90% ok ( 9/10) [  105]

Display even more details.

$ netselect -I -vvv -s 0 debian.org
Running netselect to choose 0 out of 3 addresses.       
128.31.0.62                             63 ms   15 hops - HIGHER
130.89.148.77                           40 ms   15 hops - OK
min_lag is now 40
130.89.148.77                           14 ms    8 hops - HIGHER
130.89.148.77                           37 ms   12 hops - HIGHER
130.89.148.77                           38 ms   14 hops - HIGHER
149.20.4.15                            185 ms   15 hops - HIGHER
128.31.0.62                            137 ms   23 hops - HIGHER
130.89.148.77                           37 ms   15 hops - OK
min_lag is now 37
130.89.148.77                           38 ms   15 hops - OK
130.89.148.77                           38 ms   15 hops - OK
130.89.148.77                           38 ms   15 hops - OK
128.31.0.62                            137 ms   27 hops - OK
130.89.148.77                           39 ms   15 hops - OK
149.20.4.15                            186 ms   23 hops - OK
130.89.148.77                           38 ms   15 hops - OK
130.89.148.77                           38 ms   15 hops - OK
128.31.0.62                            135 ms   25 hops - OK
130.89.148.77                           40 ms   15 hops - OK
130.89.148.77                           39 ms   15 hops - OK
149.20.4.15                            186 ms   19 hops - OK
128.31.0.62                            138 ms   24 hops - HIGHER
128.31.0.62                            137 ms   25 hops - OK
149.20.4.15                            185 ms   17 hops - OK
128.31.0.62                            134 ms   25 hops - OK
149.20.4.15                            184 ms   16 hops - OK
128.31.0.62                            135 ms   25 hops - OK
149.20.4.15                            184 ms   16 hops - OK
128.31.0.62                            135 ms   25 hops - OK
128.31.0.62                            134 ms   25 hops - OK
149.20.4.15                            183 ms   16 hops - OK
128.31.0.62                            135 ms   25 hops - OK
149.20.4.15                            184 ms   16 hops - OK
128.31.0.62                            135 ms   25 hops - OK
149.20.4.15                            185 ms   16 hops - OK
128.31.0.62                            135 ms   25 hops - OK
149.20.4.15                            183 ms   16 hops - OK
149.20.4.15                            185 ms   16 hops - OK


130.89.148.77                           38 ms  15 hops  100% ok (10/10) [   95]
128.31.0.62                            135 ms  25 hops  100% ok (10/10) [  472]
149.20.4.15                            184 ms  16 hops  100% ok (10/10) [  478]

Display details for DNS names that resolve to more than one IP address and tag these for easier reference.

$ netselect -I -vv -s 0  debian.org:debian ubuntu.com:ubuntu
Running netselect to choose 0 out of 6 addresses.       
......................................................
128.31.0.62:debian                     136 ms  25 hops  100% ok ( 2/ 2) [  476]
130.89.148.77:debian                    39 ms  15 hops  100% ok (10/10) [   97]
149.20.4.15:debian                     195 ms  19 hops   66% ok ( 2/ 3) [  849]
185.125.190.29:ubuntu                   42 ms  16 hops  100% ok (10/10) [  109]
185.125.190.21:ubuntu                   53 ms  16 hops  100% ok (10/10) [  137]
185.125.190.20:ubuntu                   43 ms  16 hops  100% ok (10/10) [  111]