TCP RTT计算时间戳

发布于 2024-10-05 07:57:39 字数 201 浏览 0 评论 0原文

我这里有一个简单的问题,如何计算 TCP 连接中的往返时间。我使用 tcpdump 获取了通信数据包。在tcp数据包中,有时间戳选项,包括TSval和TSval。 TSecr。 RFC 1323说它可以用来计算RTT。不过没说怎么做,或者说我没找到。无论如何,我对此感到困惑。任何人都可以向我解释这一点吗?我只是想知道如何计算单个发送消息的 rtt 并且它是 ack,而不是平均 rtt。

i have a simple question here, how to calculate the round-trip time in a tcp connection. I got the communication packets using tcpdump. In tcp packet, there are timestamp options, including TSval & TSecr. RFC 1323 says it can be used to calculate RTT. However, it didn't say how, or I didn't find it. Anyway, I am confused about this. Anyone can explain this to me? I just want to know how to calculate rtt for a single sent msg and it's ack, not the average rtt.

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

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

发布评论

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

评论(1

吃不饱 2024-10-12 07:57:39

您不能使用 TS 字段来计算 RTT,除非您还可以访问用于生成时间戳的时间戳时钟。

但是,如果您有使用 tcpdump 记录的数据包副本,那么您可能会记录时间戳,指示每个数据包的发送或接收时间。您可以使用这些时间戳 - 发送段 A 的时间与接收该数据的相应 ACK 时间之间的差异是该段/确认的 RTT。

You cannot use the TS fields to calculate the RTT unless you also have access to the timestamp clock that was used to generate the timestamps.

However, if you have copies of the packets recorded with tcpdump, then you likely have timestamps recorded indicating when each packet was sent or recieved. You can use these timestamps - the difference between when segment A was sent and when the corresponding ACK for that data was recieved was the RTT for that segment/acknowledgement.

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