gpt4 book ai didi

c++ - TCP over IPv4 的最小数据包大小是多少

转载 作者:可可西里 更新时间:2023-11-01 02:45:32 25 4
gpt4 key购买 nike

<分区>

TCP over IPv4 的最小数据包大小是多少?

大家好,我对这个问题很困惑。

假设我要传输一个12KB的数据

并通过 IPv4 TCP

我做了以下计算

 20 Bytes for TCP Headers
4 Bytes for Source Address
4 Bytes for Destination Address
4 Bytes on Zeros, Protocol and TCP Length
2 Bytes on Checksum
12 Bytes on Data

但是我试着用我的 friend 检查结果,我们得到了不同的..

我在 TCP 上使用维基百科上的示例,我只是假设

TCP 头是 20Bytes和上面的计算(我使用所有粉红色的 TCP 伪 header )。

我在计算中做错了什么。因为我有 2 个 friend 回答比我多 6 个字节

我的 TCP header 是 20 个字节IPV4是14字节数据为 12 字节

我们之间唯一的区别是我的 fren IPv4 是 20 字节。我在 ipv4 计算中的哪个字段做错了?

谢谢

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com