« Wild and Crazy! | Main | Puh-Programming on Puh-PICs »

Byte Space in the IPV4 Header

I listened to an interesting "Security Now!" podcast while driving to work this morning. The program covered the technical fundamentals of the Internet with a focus on packets and the role they play in Internet traffic and routing.

The paradigm-shift which made the Internet possible was to start thinking in terms of packets instead of circuits. Prior to the Internet, all communications (voice & data) links were made using dedicated circuits. There was a dedicated wire path between your phone and the party you were calling. It belonged to you, and nobody else. This proved inefficient because much of the bandwidth of that dedicated circuit was wasted on empty pauses, and was overkill for the low-bandwidth requirements of voice communications. So, the packet was introduced as a routable piece of information that did not require a dedicated link between the two parties; rather, the packet containing the source and destination information and relied on intermediate nodes to ensure its safe and expedient arrival. This is directly analogous to the postal service, where the sender and recipient information is emblazoned on the envelope and an amorphous infrastructure is used to route the envelope to its destination.

The most amazing aspect of Internet Protocol Version 4 (IPV4) is that it was designed in the mid-1980's before anyone knew that it would be used by devices ranging from million-dollar servers to fifty-dollar mobile phones. The creators of the Internet envisioned networks on a national or regional level (i.e. US Internet, Canada Internet, etc.), not the global, singular network that it is today. The physical span of the Internet (global) introduces a lot of intermediate nodes, of which there is a maximum of 255 ((2^8)-1) in IPV4. This limitation is like saying that your envelope may pass through a maximum of 255 postal offices on its way before it is deemed non-routable and returned to the sender. The reasons why 255 nodes are acceptable can likely be explained through statistical analysis, but the reasons for 255 being chosen are simply circumstantial: 255 is the number of permutations of an 8-bit byte, which is the space allocated for the Time-To-Live (TTL) component of a packet. One fewer byte would have meant an intermediate node maximum of 127. The number of nodes decreases by half for each bit removed from the TTL component.

In all, I am just amazed at the effectiveness and scalability of IPV4. It is a wonderful example of the use of real-world analogies and simple design to produce a technology that is scalable, efficient, and practical.