Internet Layer (Cont’d)

If you pay close attention, we didn’t say that the IP datagram has 65,535 bytes, but it can have up to 65,535 bytes. This means that the data field of the datagram does not have a fixed size. Since datagrams will be send over the network inside frames produced by the Network Interface layer, usually the operating system will configure the size of the IP datagram to have the maximum size of the data area of the data frames used on your network. The maximum size of the data field of the frames that will be sent over the network is called MTU, Maximum Transfer Unit.

Ethernet networks – which is the most common type of network available, including its wireless incarnation – can carry up to 1,500 bytes of data, i.e., its MTU is of 1,500 bytes. Thus usually the operating system automatically configures the IP protocol to create IP datagrams that are 1,500 bytes long, instead of 65,535 (which wouldn’t fit the frame). On the next page we will see that the real size is of 1,497 or 1,492 bytes, as the LLC layer “eats” 3 or 5 bytes for adding its header.

Just a clarification, you may be confused how a network can be classified as TCP/IP and Ethernet at the same time. TCP/IP is a set of protocols that deals with layers 3 to 7 from the OSI reference model. Ethernet is a set of protocols that deals with layers 1 and 2 from the OSI reference model – meaning Ethernet deals with the physical aspect of the data transmission. So they complement each other, as we need the full seven layers (or their equivalents) to establish a network connection. We will explain more about this relationship in the next page.

Another feature that IP protocol allows is fragmentation. As we mentioned, until arriving at its destination, the IP datagram will probably pass through several other networks in the middle of the road. If all networks in the path between the transmitting computer and the receiving one use the same kind of network (e.g., Ethernet) then everything is fine, as all routers will work with the same frame structure (i.e., the same MTU size).

However, if those other networks are not Ethernet networks, they may use a different MTU size. If that happens, the router that is receiving the frames with the MTU set to 1,500 bytes will cut the IP datagram inside each frame in as many as necessary in order to cross over the network with the small MTU size. Upon arriving at a router that has its output connected to an Ethernet network, this router will re-assemble the original datagram.

In Figure 5, you can see an example of this. The original frame uses a MTU of 1,500 bytes. When it arrived at a network with a MTU size of 620 bytes, each frame had to be broken into three frames (two with 600 bytes and one with 300 bytes). Then the router at the exit of this network (router 2) re-assembled the original datagram.

Of course the IP header has a field for controlling fragmentation.

TCP/IP fragmentationFigure 5: Datagram fragmentation.

Gabriel Torres is a Brazilian best-selling ICT expert, with 24 books published. He started his online career in 1996, when he launched Clube do Hardware, which is one of the oldest and largest websites about technology in Brazil. He created Hardware Secrets in 1999 to expand his knowledge outside his home country.