How are IP packets reassembled

1.2k views Asked by At

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?

2

There are 2 answers

0
PaulK On

Okay after doing some more researching, it really is the case that the maximum size of an IP packet is determined by the maximum transmission unit (MTU) of the data-link.

For those who care, this website breaks it down pretty well: http://aa.net.uk/kb-broadband-mtu.html

0
Sem On

Size of an IP fragment is limited by MTU, size of an IP packet is limited by size field of the IP header. Receiver can understand the overall size and whether IP fragment received is the first one or not by using Total Length and Fragment offsets fields. If assembling went wrong, then checksum of the next layer will say it to you, or you start receiving fragments which will cover duplicated offsets. Its for IPv4. For IPv6 it works differently with mandatory MTU discovery and almost forbidden IP packet fragmentation..