system info:
cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
Linux lb-cam-bca-centos7devel 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ping -V
ping utility, iputils-s20160308
[root@lb-cam-bca-centos7devel infping]# nping -V
Nping version 0.6.40 (
http://nmap.org/nping )
[root@lb-cam-bca-centos7devel infping]#
I've recently been using ping and nping to monitor some latency issues and have noticed that there seems to be a discrepancy in the output between the two, specifically with regards to min rtt.
The actual reason I use nping is so I can use the --tcp option to specifically monitor tcp trip times and initially thought the discrepancy was to do with using tcp, but I see it even when removing the use of that option.
When do a ping I see something like the following:
ping -c 10 remotehost
PING remotehost.net (10.110.48.94) 56(84) bytes of data.
64 bytes from remotehost.net (10.110.48.94): icmp_seq=1 ttl=54 time=110 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=2 ttl=54 time=10.3 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=3 ttl=54 time=10.3 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=4 ttl=54 time=26.8 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=5 ttl=54 time=59.8 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=6 ttl=54 time=47.5 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=7 ttl=54 time=64.7 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=8 ttl=54 time=39.0 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=9 ttl=54 time=57.0 ms
64 bytes from remotehost.net (10.110.48.94): icmp_seq=10 ttl=54 time=73.2 ms
--- remotehost.net ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9004ms
rtt min/avg/max/mdev = 10.323/49.928/110.192/28.873 ms
Because there are issues with this connection the reported values vary widely, but generally the min rtt is consistent with the individusl values and also with the output I see using mtr.
However when using nping I consistently get output looking something like this:
nping -c 10 remotehost
Starting Nping 0.6.40 (
http://nmap.org/nping ) at 2020-07-06 12:11 BST
SENT (0.0226s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=1] IP [ttl=64 id=35732 iplen=28 ]
RCVD (0.0328s) ICMP [10.110.48.94 > 10.168.6.115 Echo reply (type=0/code=0) id=62976 seq=1] IP [ttl=54 id=55802 iplen=28 ]
SENT (1.0234s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=2] IP [ttl=64 id=35732 iplen=28 ]
RCVD (1.0336s) ICMP [10.110.48.94 > 10.168.6.115 Echo reply (type=0/code=0) id=62976 seq=2] IP [ttl=54 id=55804 iplen=28 ]
SENT (2.0240s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=3] IP [ttl=64 id=35732 iplen=28 ]
SENT (3.0244s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=4] IP [ttl=64 id=35732 iplen=28 ]
SENT (4.0250s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=5] IP [ttl=64 id=35732 iplen=28 ]
SENT (5.0258s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=6] IP [ttl=64 id=35732 iplen=28 ]
RCVD (5.0259s) ICMP [10.110.48.94 > 10.168.6.115 Echo reply (type=0/code=0) id=62976 seq=3] IP [ttl=54 id=55806 iplen=28 ]
SENT (6.0268s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=7] IP [ttl=64 id=35732 iplen=28 ]
SENT (7.0276s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=8] IP [ttl=64 id=35732 iplen=28 ]
SENT (8.0287s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=9] IP [ttl=64 id=35732 iplen=28 ]
RCVD (8.0288s) ICMP [10.110.48.94 > 10.168.6.115 Echo reply (type=0/code=0) id=62976 seq=4] IP [ttl=54 id=55808 iplen=28 ]
SENT (9.0336s) ICMP [10.168.6.115 > 10.110.48.94 Echo request (type=8/code=0) id=62976 seq=10] IP [ttl=64 id=35732 iplen=28 ]
Max rtt: 10.177ms | Min rtt: 0.042ms | Avg rtt: 5.104ms
Raw packets sent: 10 (280B) | Rcvd: 4 (184B) | Lost: 6 (60.00%)
Nping done: 1 IP address pinged in 9.03 seconds
This is indicating packet loss where (usually) ping does not and the reported min rtt is consistently very low (<0.1) which is clearly (to my mind) incorrect.
As I understood it both ping an nping use icmp by default and I should be getting similar output. Is that not the case ? Have I mis-understood what nping is doing ?
Does anyone have an explanation for the differences I am seeing here ?