TCP/IP is designed for use with many different kinds of networks. Unfortunately, network designers do not agree about how big packets can be. The MTU or Maximum Transmission Unit size is the maximum size of the data field for the underlying physical network. Different network types have different MTU sizes:
|Network Type||MTU (bytes)|
|Token Ring||4440 to 17940|
|ARPANET via DDN X.25||1007|
At first, you might think that IP should simply settle on the smallest possible size. Unfortunately, this would cause serious performance problems. When transferring large files, big packets are far more efficient than small ones. So we want to be able to use the largest packet size possible. But we also want to be able to handle networks with small limits. There are two provisions for this:
When an IP datagram is fragmented, each fragment becomes its own packet, with its own IP header, and is routed independently of any other packets. This makes it possible for the fragments of a datagram to arrive at the final destination out of order. There is enough information in the IP header to allow the receiver to reassemble the fragments correctly. Let's see what happens if we want to transmit 1473 bytes of data, using UDP:
Two packets travel across the network, the first containing the UDP-header + 1472 bytes of data. Together with the IP-header the packet is 1500 bytes long, the Ethernet MTU. The second packet contains an IP-header + 1 byte of data, 21 bytes in total.
Recalling the IP header, the following fields are used in fragmentation. The identification field contains a unique value for each IP datagram that the sender transmits. This number is copied into each fragment of a particular datagram. (We now see the use for this field.) The flags field uses one bit as the "more fragments" bit. This bit is turned on for each fragment comprising a datagram except the final fragment. The fragment offset field contains the offset of this fragment from the beginning of the original datagram. Also, when a datagram is fragmented the total length field of each fragment is changed to be the size of that fragment.
Finally, notice that the original UDP-header, containing the source and destination port numbers, occurs only in the first fragment. In fact, any transport layer header appears only in the first fragment. This can be quite cumbersome when dealing with firewall-strategies, often based on information about protocol application type or port numbers.
P. Op de Beeck - De Nayer Instituut
J. De Nayerlaan 5
NW.05.BAR - TCP/IP