In the early 1970s, scientists and engineers began working on a new computer networking technology. They designed this technology around a basic three-layer model:
• The physical layer would handle the physical process of carrying data between two interfaces.
• The network layer would provide an interface between physical transports (there were many at the time) and applications.
• The application layer would handle carrying data between applications using the network layer.
This initial set of protocols was called the Transmission Control Protocol or Transmission Control Program, both shortened to TCP.
In 1977, Jon Postel split TCP into two protocols—one providing the interface between physical and network transports and the second providing the actual transport of data, including flow control and error control. Postel’s split significantly simplified both protocols.
The upper layer protocol was still called TCP, and the new lower layer protocol was called the Internet Protocol (IP). Postel published a Request for Comment (RFC), a format all researchers used to propose protocols, calling it TCPv3.
The research community worked on and with TCPv3 for two years, publishing Internet Protocol version 4 (IPv4) in 1980. The United States Department of Defense (US DoD) adopted IPv4 for all its computer systems, and the Internet Engineering Task Force (IETF) adopted IPv4 as a standard in 1981.
IPv4’s primary job is to provide a consistent set of networking abstractions across different physical links. Figure 14-2
illustrates the role of IPv4.
Figure 14-2 The Role of IP
All the protocols above IP in Figure 14-2 can run on any physical network topology without modification. The designers of each protocol below IP ensure the IP protocol can run their medium. Splitting IP from TCP allowed IP to focus on addressing and ensuring consistent formatting across different kinds of physical media.
IPv4 carries data through encapsulation—forming a packet by adding a header to a data block. Figure 14-3 illustrates the IPv4 header.
Figure 14-3 The IPv4 Header
The IPv4 header carries a lot of information about where the packet of information is going, where it came from, and how it should be handled:
• Version is always 4.
• Internet Header Length (IHL) gives the total length of the header in octets.
• Type of Service describes how this packet should be queued by routers. Should this packet be given priority, can the packet be discarded, etc.?
• Total Length is the total length of the IPv4 packet in octets.
• Identification is used to control and identify fragments.
• Flags are used to control and identify fragments.
• Fragment Offset is used to identify fragment order for reassembly.
• Time to Live (TTL) notes how many routers may process this packet before it should be discarded.
• Protocol indicates the kind of protocol carried in this packet (UDP, TCP, etc.).
• Header Checksum provides a basic check for packet corruption in transmission.
Note
Other fields, such as options, are outside the scope of this book.
Two fields are particularly interesting to network engineers— those used for fragmentation and the TTL.
Fragmentation In Figure 14-4, Host A sends a packet toward server D.
Figure 14-4 Packet Fragmentation
Because A only knows its local link, it builds a 1500-octet packet. Router B needs to forward this packet toward C, but the link between B and C can only support 1000 octets or smaller packets. Router B has two choices:
• Drop or discard the packet.
• Break the packet into smaller pieces, or fragment it.
Router B might break the packet into two smaller packets or fragment the packet. To fragment the packet, router B
• Copies the packet into memory.
• Splits the data the packet is carrying (called the payload).
• Copies the original header onto the newly created packet.
• Sets the identifier field in both packets to some number so the receiver knows these two packets are part of a set of packets created from a single packet.
• Sets the offset field in the second header to where it splits the data.
Router B then forwards these two packets to router C, which then forwards them to server D. Server D reassembles the two packets into one and passes the data to the upper layer protocol for processing.
Fragmentation is no longer widely used in computer networks.
Fragmenting packets requires a lot of processing power and memory. Most routers no longer support IPv4 fragmentation, and many hosts will discard fragmented packets.
Instead of fragmentation, most hosts now support Path MTU Discovery, considered in a later section.