TCP数据包中的冗余数据是什么?

发布于 2024-09-07 13:43:05 字数 669 浏览 9 评论 0原文

我正在阅读“Unix网络编程”并tcpdump示例生成的数据包。该示例只是发送一个包含字符串“liha”的数据包。

我阅读了 TCP/IP RFC,发现正常的 IP 标头是 20B。正常的TCP头除了数据之外都是24B。

因此,捕获的数据包中字符串“liha”之前有8B。 “0121 3d2a 0120 b43e”没有用吗?

11:00:51.690949 IP localhost.40163 > localhost.9877: Flags [P.], seq 94:99, ack 95, win 513, options [nop,nop,TS val 18955562 ecr 18920510], length 5
         0x0000:  4500 0039 ddc6 4000 4006 5ef6 7f00 0001  E..9..@.@.^.....
         0x0010:  7f00 0001 9ce3 2695 8465 e35c 8466 58ca  ......&..e.\.fX.
         0x0020:  8018 0201 fe2d 0000 0101 080a 0121 3d2a  .....-.......!=*
         0x0030:  0120 b43e 6c69 6861 0a                   ...>liha.

I am reading "Unix Network Programming" and tcpdump the packet generate by the example. The example is just send out a packet contain string "liha".

I read the TCP/IP RFC and found normal IP header is 20B. and normal TCP header except data is 24B.

So, there are 8B before string "liha" in the captured packet. Are "0121 3d2a 0120 b43e" useless?

11:00:51.690949 IP localhost.40163 > localhost.9877: Flags [P.], seq 94:99, ack 95, win 513, options [nop,nop,TS val 18955562 ecr 18920510], length 5
         0x0000:  4500 0039 ddc6 4000 4006 5ef6 7f00 0001  E..9..@.@.^.....
         0x0010:  7f00 0001 9ce3 2695 8465 e35c 8466 58ca  ......&..e.\.fX.
         0x0020:  8018 0201 fe2d 0000 0101 080a 0121 3d2a  .....-.......!=*
         0x0030:  0120 b43e 6c69 6861 0a                   ...>liha.

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

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

发布评论

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

评论(1

只是偏爱你 2024-09-14 13:43:05

这些是 TCP 选项。您的分析器已经为您解析了它们:

options [nop,nop,TS val 18955562 ecr 18920510],

它们通常很重要,并被通信双方用来协商哪些额外的增强功能可用于 TCP 连接。

Those are the TCP options. And your analyzer already parsed them for you:

options [nop,nop,TS val 18955562 ecr 18920510],

They are generally important and used by communication sides to negotiate which extra enhancements can be used for the TCP connection.

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