The Maximum Transmission Unit (MTU) is the largest size of IP datagram which may be transferred using a specific data link connection The MTU value is a design parameter of a LAN and is a mutually agreed value (i.e. both ends of a link agree to use the same specific value) for most WAN links.
The size of MTU may vary greatly between different links (e.g. typically from 128 B up to 10 kB).The prevalent Path MTU on the Internet is now 1500 bytes, the Ethernet MTU. There are some initiatives to support larger MTUs in networks (e.g. 8 KB), in particular on research networks. But their usability is hampered by last-mile deployment of Ethernet with an MTU of 1500 and lack of robustness of Path MTU Discovery. This lead to a more robust method being defined in [RFC4821].
The transport layer (TCP or UDP) is unaware of the particular path taken by an IP packet as it travels through a network. It therefore does not know what size of IP packet to generate. Too small a packet may be inefficient (i.e. there may be little data compared to lots of header), a larger packet is therefore more efficient. Too large an IP packet may exceed the MTU of the links over which the packet may be sent, causing fragmentation.
"Calculate the number of fragments which are sent when an IP datagram with payload of 3000 bytes is sent from a computer on a network A via two routers to a destination computer C. The MTU if network A is 4000 B. The MTU of network B is 508 B and for network C the MTU is 1500 B. Ensure that your answer specifies the number and size the of the IP datagrams sent on each of the LANs."
On First LAN
Total size of initial PDU = 3000 + 20 B (PCI) = 3020 B.
Network A: MTU 4000 B > 3020 B - therefore one packet is sent.
(packet sent with offset=0, more=FALSE)
On Second LAN
Network B: MTU 508 B < 3020 B - therefore fragmentation is required.
IP fragment payload size = 508- 20 B = 488 B. (Note this is aligned to an 8-byte boundary)
Total number of packets sent via network B = round(3000/488) = 7 packets.
First six packets of size 508 B, each with 488B of IP packet payload
The last packet has 48 B of data, and therefore of size 20 B + 72 B=92 B.
(all packets except first sent with offset>0,)
(packets 1-6 have more=TRUE, last packet has more=FALSE)
(This last fragment does not need to have a length that is divisible by 8).
On Final LAN
Fragments are not reassembled by a router - i.e. at router C.
Router C therefore receives 7 packets, 6 of size 508 B, 1 of size 92 B.
Network C: MTU 1500 B > 508 B - No further fragmentation is therefore needed.
i.e. There are 7 packets, as in network C, 6 of size 508 B and one of size 92 B.
The IP network protocol requires that all fragments except the last contain an integral number of 8 B (64-bit) chunks of data. This requires the payload to be exactly divisible by 8 in all packets that have the "More" bit set. This requirement arises because of the way the fragmentation offset is encoded in the IP packet header.
J. Mogul & Steve Deering, Path MTU Discovery, RFC 1191
Mathis, M. and J. Heffner, "Packetization Layer Path MTU Discovery", RFC 4821, March 2007.
G Fairhurst et al, "Datagram Packetization Layer Path MTU Discovery", RFC 8899, 2020.