4

I am currently studying networking as a part of my bachelors and I am a bit confused about why fragmentation/MTUs are necessary. In my lecture slides, it only says "Fragmenting if necessary" under the "Functions of the Network Layer" and when re-listening to the lecture recording, the lecturer does not really expand on it much. Our course textbook is Tanenbaum's "Computer networking" which also provides no extra information.

I read the Wikipedia article on MTUs and I now understand the core concept, however, I fail to understand why were fragmentation and MTUs introduced in the first place. Intuitively, I can understand how if there is a huge chunk of data and a small error occurs, you would have to re-send the whole enormous packet which is wasteful. Is this correct? And what are the other reasons why fragmentation is used? What would happen in a hypothetical network that does not fragment data/have MTUs - is it even possible for the physical layer to handle that?

6

One of the two basic functions for IPv4 is packet fragmentation (the other is addressing). IP is designed to send packets from one network to another network. Each network can have a different maximum packet size.

For example. the original serial WAN connections could have maximum packet sizes of greater than 4000 bytes, but ethernet specifies a maximum packet size of 1500 bytes. If a host on a network sends a 4000 byte packet to an ethernet network where the maximum packet size is 1500 bytes, without fragmentation, the router would need to simply drop the packet. With fragmentation, the router can fragment the packet into smaller packets that can be sent on the ethernet network.

RFC 791, Internet Protocol explains about fragmentation:

The internet protocol also provides for fragmentation and reassembly of long datagrams, if necessary, for transmission through "small packet" networks.

-and-

The internet protocol implements two basic functions: addressing and fragmentation.

-and-

The internet modules use fields in the internet header to fragment and reassemble internet datagrams when necessary for transmission through "small packet" networks.

-and-

In the routing of messages from one internet module to another, datagrams may need to traverse a network whose maximum packet size is smaller than the size of the datagram. To overcome this difficulty, a fragmentation mechanism is provided in the internet protocol.

and so on...



Remember that IPv4 was a government/academic experiment that escaped the lab and got out of control. It was never envisioned to be the Internet we have today. After seeing the strengths and weaknesses in IPv4, the IETF designed IPv6, which has eliminated packet fragmentation in the path (requiring the use of PMTUD to determine the smallest maximum packet size in the path prior to sending), among other improvements to IP.


Edit for your clarification of MTU:

The MTU was not "introduced" as you have implied. The MTU is a function of the maximum payload size of a layer-2 protocol. Each protocol must have a maximum payload size. For ethernet, it was determined that 1500 octets struck a good balance on the amount of data that can be transferred without monopolizing the medium. Other designers of layer-2 protocols make their own determinations as to the maximum payload size for a frame for their layer-2 protocols.

IP, as a layer-3 protocol (the payload of a layer-2 protocol), must simply live with the MTU of the layer-2 protocols used to carry it. IP has no idea which layer-2 protocol is carrying it, or which other layer-2 protocols may be used in the path to the destination of the IP packet.


Remember that IP was designed by a government program in conjunction with universities and the telco, but that program had nothing to do with the designs of the layer-2 protocols in use today. IP was designed to be carried by any layer-2 protocol.

7
  • Thank you for your reply! I understand the core concept of MTUs and fragmentation and I realise now that my question was not specific enough. What I am still a bit confused about is why fragmentation and MTUs were introduced in the first place? What is the benefit of fragmentation/MTUs and what would networking be like if fragmentation/MTUs did not exist? I also wanted to ask if I understood the IPv4 vs IPv6 fragmenting part correctly - with IPv4 the fragmentation was done by the routers "on-the-go" and for IPv6 fragmentation is done beforehand?
    – mariaprsk
    Feb 9 '20 at 19:05
  • 2
    The MTU is the payload size of a layer-2 frame. IP is a layer-3 protocol, so it has no say in the MTU, which is dictated by the layer-2 protocol. IP can be carried by any number of layer-2 protocols, which were developed independently of IP. IPv4 has fragmentation because it was developed to be carried by any arbitrary layer-2 protocol. IPv6 has a fragmentation header, but properly done, it will not be used because the upper-layer protocols can determine the PMTU prior to passing data down to IPv6 to be sent.
    – Ron Maupin
    Feb 9 '20 at 19:09
  • I see, but why does the layer-2 frame have a maximum size? Is transmitting larger messages physically not possible?
    – mariaprsk
    Feb 9 '20 at 19:24
  • 2
    Well, think about ethernet. It was developed for a shared medium (as is Wi-Fi today). If you did not have a maximum payload size, then one workstation could hog the entire medium with a single frame, preventing any other workstations from sending. Also, you need to understand the limitations of computers at the time protocols like ethernet were created. They were typically 16-bit CPUs with very limited RAM, so buffering of frames was also a concern.
    – Ron Maupin
    Feb 9 '20 at 19:27
  • Thank you so much, this answers all of the questions I had!
    – mariaprsk
    Feb 9 '20 at 20:18
3

Today, Ethernet and WiFi are almost the universal layer 2 medium, but in the early days of networking, that wasn't the case. There were many types of WAN protocols, based on different underlying technologies (mostly tied to telephone networks). These different technologies had varying MTU sizes. Fragmentation is used to accommodate traversing different network types with different MTUs.

Note that a router in the path can fragment packets to fit the MTU, but it's up to the receiving host to put them all back together.

7
  • Even with ethernet and W-Fi, you have different MTU sizes,
    – Ron Maupin
    Feb 9 '20 at 17:52
  • I was under the impression that even now there are different MTU sizes as @RonMaupin mentioned
    – mariaprsk
    Feb 9 '20 at 18:58
  • Yes there are.. I was making the point that there is an historical aspect to why things are the way they are.
    – Ron Trunk
    Feb 9 '20 at 19:40
  • Not according to 802.3 documented standards. (1500. Jumbo frames are non-standard, which is why there is no single jumbo frame size.)
    – Ricky
    Feb 9 '20 at 21:50
  • 1
    Because wifi is almost always bridged to ethernet, it uses 1500 in almost all contexts. (per spec, it's 2304 -- networkengineering.stackexchange.com/questions/32970/… )
    – Ricky
    Feb 10 '20 at 1:57

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.