2

According to RFC791:

Every internet module must be able to forward a datagram of 68 octets without further fragmentation. This is because an internet header may be up to 60 octets, and the minimum fragment is 8 octets.

I'm a bit confused about the "an internet header may be up to 60 octets" part. The minimum size of a IPv4 header is 20 bytes and not 60. So shouldn't the minimum MTU be 20 bytes for the IPv4 header plus the minimum fragment which is 8 bytes? And shouldn't we consider the upper layer header lengths as well?

The RFC also mentions:

Every internet destination must be able to receive a datagram of 576 octets either in one piece or in fragments to be reassembled.

So is the MTU 68 bytes or 576 bytes?

4

You need to account for Internet Options in the header. Take a look at the third example in appendix A which shows a few option fields appended to get well past 20 bytes (the example adds 12 bytes, but the number is variable and can be more).

The upper-layer header lengths aren't IP's direct concern. The header obviously contains information about the protocol type but apart from that the upper-layer protocol spec is outside the scope of the IP header.

So the RFC is basically saying that, for a router, the biggest possible IP header is 60 bytes and the smallest payload is 8 bytes (so, a 68 byte packet). In turn a given end host must be able to receive a final packet of up to 576 bytes (which may be made up of a bunch of fragments, depending on the MTU's of routers along the path).

So the minimum sized packet could - in theory - be 20 bytes of header (no options) plus the minimum 8 bytes of payload. This would have to be a fragment, as otherwise the packet would include some amount of L4 header protocol information.

  • In the last part you mentioned that the header length is 20 bytes and the payload is 8 bytes which turns out to be a total IPv4 packet size of 28 bytes. But in the first example in appendix A, the packet size is 21 bytes (packet - 20 bytes, payload - 1 byte) and it's a complete datagram (And not a fragment) as per the RFC. – glitchedout Jan 8 '17 at 8:16
  • My understanding is that the minimum payload size for a fragment was 8 octets (padded, if necessary) but standalone/initial packets can be a single octet. – rnxrx Jan 8 '17 at 8:50
  • @glitchedout, you are confusing the minimum IPv4 header size with the maximum IPv4 header size. Also, you are confusing the minimum payload size with the minimum fragment size. Fragmentation must occur on 64-bit (8-byte) boundaries. That has nothing to do with the minimum payload size. Fragmentation only occurs with packets that are too large to fit the MTU, but packets smaller than the MTU are allowed. – Ron Maupin Jan 8 '17 at 18:11
  • @glitchedout All fragments (except from the last) are required to carry a multiple of 8 bytes of payload. Payload being anything after the IP header. In IPv4 an unfragmented packet is just a special case of being simultaneously the first and last packet, thus it does not have to be a multiple of 8 bytes. – kasperd Feb 11 '17 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.