Hey guys,
I know this is super similar to doing basic ping on the fw expert mode, but it does give an option to also check latency to any IP that resolved to specific domain name. I paste dbelow example from my lab:
[Expert@CP-GW:0]# ./cp-latency.sh
Usage:
./cp-latency.sh <fqdn|ip> [icmp|tcp|both] [port] [count] [timeout_sec]
Examples:
./cp-latency.sh example.com
./cp-latency.sh 1.1.1.1 icmp
./cp-latency.sh example.com tcp 443 10 2
[Expert@CP-GW:0]# ./cp-latency.sh google.com
===============================================
Target: google.com
Mode: both
Port: 443
Count: 5
Timeout:2s
===============================================
Resolved IP(s):
- 142.250.139.102
- 142.250.139.113
- 142.250.139.139
- 142.250.139.101
- 142.250.139.138
- 142.250.139.100
-----------------------------------------------
Testing IP: 142.250.139.102
-----------------------------------------------
ICMP (ping) to 142.250.139.102 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
min=3.935ms avg=5.010ms max=6.300ms (jitter=1.005ms)
TCP connect timing to 142.250.139.102:443 samples=5 timeout=2s
sample 1: 16 ms (OK)
sample 2: 15 ms (OK)
sample 3: 15 ms (OK)
sample 4: 13 ms (OK)
sample 5: 16 ms (OK)
avg connect time: 15 ms (success 5/5)
-----------------------------------------------
Testing IP: 142.250.139.113
-----------------------------------------------
ICMP (ping) to 142.250.139.113 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
min=6.312ms avg=7.187ms max=8.681ms (jitter=0.880ms)
TCP connect timing to 142.250.139.113:443 samples=5 timeout=2s
sample 1: 25 ms (OK)
sample 2: 23 ms (OK)
sample 3: 20 ms (OK)
sample 4: 20 ms (OK)
sample 5: 19 ms (OK)
avg connect time: 21 ms (success 5/5)
-----------------------------------------------
Testing IP: 142.250.139.139
-----------------------------------------------
ICMP (ping) to 142.250.139.139 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
min=5.963ms avg=7.019ms max=9.628ms (jitter=1.348ms)
TCP connect timing to 142.250.139.139:443 samples=5 timeout=2s
sample 1: 21 ms (OK)
sample 2: 12 ms (OK)
sample 3: 18 ms (OK)
sample 4: 16 ms (OK)
sample 5: 16 ms (OK)
avg connect time: 16 ms (success 5/5)
-----------------------------------------------
Testing IP: 142.250.139.101
-----------------------------------------------
ICMP (ping) to 142.250.139.101 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
min=6.286ms avg=7.008ms max=7.993ms (jitter=0.622ms)
TCP connect timing to 142.250.139.101:443 samples=5 timeout=2s
sample 1: 17 ms (OK)
sample 2: 17 ms (OK)
sample 3: 19 ms (OK)
sample 4: 21 ms (OK)
sample 5: 19 ms (OK)
avg connect time: 18 ms (success 5/5)
-----------------------------------------------
Testing IP: 142.250.139.138
-----------------------------------------------
ICMP (ping) to 142.250.139.138 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
min=4.406ms avg=4.574ms max=5.056ms (jitter=0.249ms)
TCP connect timing to 142.250.139.138:443 samples=5 timeout=2s
sample 1: 21 ms (OK)
sample 2: 21 ms (OK)
sample 3: 21 ms (OK)
sample 4: 27 ms (OK)
sample 5: 20 ms (OK)
avg connect time: 22 ms (success 5/5)
-----------------------------------------------
Testing IP: 142.250.139.100
-----------------------------------------------
ICMP (ping) to 142.250.139.100 count=5 timeout=2s
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
min=5.439ms avg=5.682ms max=6.523ms (jitter=0.425ms)
TCP connect timing to 142.250.139.100:443 samples=5 timeout=2s
sample 1: 15 ms (OK)
sample 2: 17 ms (OK)
sample 3: 14 ms (OK)
sample 4: 14 ms (OK)
sample 5: 19 ms (OK)
avg connect time: 15 ms (success 5/5)
[Expert@CP-GW:0]#
Best,
Andy