使用 TCP Ack 来测量服务器的延迟?

发布于 2024-08-31 13:40:00 字数 212 浏览 4 评论 0原文

我正在尝试测量我无法控制的服务器的延迟。这是在并置环境中,因此延迟约为 500 us (0.5 ms)。

据我了解,Cisco 设备经常降低 ICMP 流量的优先级,导致 ping 时间不可靠。有没有办法让我判断我正在移动的齿轮是否出现这种情况?

我可以使用 TCP 确认来确定远程服务器的最小延迟吗?为此,我需要以某种方式强制远程服务器在收到我的数据后立即发送 TCP 确认。

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 us (.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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

﹉夏雨初晴づ 2024-09-07 13:40:00

尝试一下hping。您可以发送 ack 并测量延迟:

hping -A -p 80 host

或使用 SYN:

hping -S -p 80 host

另请注意,第 2 层链路上的优先级不太可能(但有可能)。此外,看到 ARP 比 ICMP 慢并不一定意味着 ICMP 没有被降低优先级,这可能意味着带宽不足以达到限制阈值。

ARP 几乎总是较慢,因为它进行广播并且可能会在交换机上遭受端口排队。您可以单播 ARP,但如果有人在寻找它,这可能会显得可疑。

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.

夜雨飘雪 2024-09-07 13:40:00

您可以尝试使用 arping,它会执行以下操作:使用 ARP 进行 ping 操作。

You could try using arping, which does a ping using ARPs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文