1

Let's say we have an IP packet with a total size of 12000 bytes and we send this packet from station A to station B over the data-link layer. A single Ethernet frame can carry up to 1500 bytes of payload data, so in total, we would need 8 Ethernet frames to transmit the 12000 bytes IP packet, correct?

Let's assume the first Ethernet frame (carrying the IP header) gets garbled during transmission and the TotalLength field of the IP header no longer contains the actual length but just some nonsense value. Even if station B realizes that the header checksum is no longer valid and discards the frame, how can station B know where the next IP packet starts in the incoming data stream? It does not know how many bytes of payload the first IP packet had, right?

Or is the size of an IP packet effectively limited by the maximum length of the payload that the underlying data-link frame can handle?

4

2 回答 2

2

好的,经过更多研究,IP数据包的最大大小确实是由数据链路的最大传输单元(MTU)决定的。

对于那些关心的人,这个网站很好地分解了它:http: //aa.net.uk/kb-broadband-mtu.html

于 2013-08-07T13:55:32.323 回答
1

IP 分片的大小受 MTU 限制,IP 包的大小受 IP 头的大小字段限制。接收方可以通过 Total Length 和 Fragment offsets 字段了解整体大小以及收到的 IP 分片是否是第一个。如果组装出错,那么下一层的校验和会告诉你,或者你开始接收将覆盖重复偏移的片段。它适用于 IPv4。对于 IPv6,它与强制 MTU 发现和几乎禁止的 IP 数据包分段的工作方式不同。

于 2015-07-02T08:15:24.327 回答