I am trying to measure latency to a server that I don't control. This is in a colocated environment, so the latency is on the order of 500 u开发者_如何学编程s (.5 ms).
I understand that Cisco gear frequently deprioritizes ICMP traffic, making ping times unreliable. Is there a way for me to tell if this is the case on the gear I am traversing?
Can I use TCP acknowledgements to determine the minimum latency to the remote server? To do this, I would somehow need to force the remote server to send a TCP ack immediately on receiving my data.
Try hping. You can send acks and measure the latency:
hping -A -p 80 host
or with a SYN:
hping -S -p 80 host
Also note, deprioritization on a layer-2 link is unlikely (but possible). In addition, seeing ARP being slower than ICMP doesn't necessarily mean ICMP isn't deprioritized---it might mean bandwidth is insufficient to hit the limiting threshold.
ARP will almost always be slower because it broadcasts and may suffer port-queuing at the switch. You could unicast ARP, but that might look suspicious if anyone is looking for it.
You could try using arping
, which does a ping using ARPs.
精彩评论