1

I'm reading book TCP/IP Illustrated, Vol.1 and there it says that IP fragmentation is done by network layer.

This is how I understood the concept so far: Network layer (L3) creates "IP datagram" (IP header + data) and sends that byte array to data link layer (L2). If L2 doesn't know about IP datagram structure, and received byte array is greater than maximal size, it wouldn't know how to split that byte array and append IP header to each chunk, as its L3's responsibility. So L2 and L3 have to cooperate somehow.

What confuses me is that few pages later, when discussing about IP header, total length and max size of IP datagram, it says: "Although it's possible to send a 65535-byte IP datagram, most link layers will fragment this".

Is my "concept" wrong? Does L2 actually know about IP datagram structure so it could fragment IP datagram? If that's true, why doesn't L2 always do the fragmentation since it knows its MTU?

3 Answers 3

2

IP fragmentation is a thing, chopping up datagrams at the IP layer. Reassembly work, and possible re-transmit if one of the fragments is lost, means fragmentation is to be avoided.

The underlying layer 2 is separate and wraps each packet (fragment) in a frame. In fact that's all it can do as generally L2, and certainly not Ethernet, does not do "fragmentation".

Determining an optimum size is much less coordination and more like guesswork, and is called Path MTU Discovery. The network stack is very unlikely to try the maximum of 65535 bytes. Maybe an ICMP message will come back that the size is too big. Although the path is probably an Ethernet interface from the beginning, so trying anything over 1400 or so is probably not going to work.

1
  • Thanks for the explanation. I appreciate the 'networkengineering' link too, it has some additional clarification that I find useful
    – David
    Jan 4, 2018 at 20:05
1

The wording is misleading. The IP layer knows the maximum payload size of the link layer so it does the fragmentation.

0

L2 doesn't know about IP but it has it's own limitations on frame size. Any IP datagram greater than the L2 frame size will be spit across 2 to more L2 frames.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .