The Mechanics of Logical Adjacency

To enable the logical adjacency of layers, each layer of the originating machine's protocol stack adds a header to the data received from the layer above it. This header can be recognized and used by only that layer or its counterparts on other machines. The receiving machine's protocol stack removes the headers, one layer at a time, as the data is passed up to its application. Figure 1-7 illustrates this process. Note that Figure 1-7 presents a theoretical view of layered communications rather than a technically accurate depiction of any single protocol's processes.

Figure 1-7: Use of layered headers to support logical adjacency.

Figure 1-7: Use of layered headers to support logical adjacency.

Given that Layer 3/4 protocol stacks must rely on a Layer 2 and Layer 1 LAN architecture to actually deliver their data, they must have some standardized means of passing data to these layers. The technique that is used is called wrapping. The following sections present a highly simplified overview of the way that data is passed between layers in a typical TCP/IP over Ethernet session. Given that routers operate at the first three or four layers (depending on the actual protocol) of the OSI reference model, understanding this process will also provide a glimpse into some of the internal mechanics of a router.

Creating TCP Segments

A communications session begins when TCP (a Layer 4 protocol) receives data from one of the higher-layer protocols and/or applications that it supports for transmission to another networked device. The TCP protocols package the data into segments. Ostensibly, applications can forward large quantities of data. TCP, or any transport layer protocol, must begin the process of breaking down a large amount of

An Introduction to Internetworking data into more manageable pieces. Each piece of data is called a segment.

Part of the process of segmentation is the population of the TCP header fields. Two of the more important of these fields are the sequence number and the source and destination port numbers of the applications that are sending and receiving the segmented data. The sequence number identifies the order in which the segments were carved from the original data stream. This enables the recipi- ent to reconstruct the data stream without jumbling its contents.

The source and destination ports allow the sending and receiving machines to identify the application responsible for the data via the use of an identification number. This number is referred to as a socket. A socket consists of two numbers, the machine's IP address and an application's port number. These two numbers are concatenated into one---the socket. It is a rare machine that only supports a single application. Therefore, it is imperative to be able to forward the data and receipt acknowledgments to the correct applications. These data segments are handed off to the Layer 3 protocol, IP, of the same machine.

Creating IP Packets

IP bundles data received from the TCP into packets (that is, it packetizes the segments). Included in the IP packet's header are the source and destination machines' IP addresses. These are the fields that enable routers to forward IP packets to destinations beyond the local network. IP packets that bear application data are also known as datagrams.

There will, ideally, be a one-to-one correlation between TCP segments and IP packets. In other words, IP would just wrap a header around each segment and pass it on to the data link layer. It is possible, however, that a segment may not fit entirely within a single packet. When this occurs, the segment's two fragments are split between two packets. In such cases, it is possible that just a fragment of a segment arrives at a destination. The IP packet bearing the other fragment can become corrupt, or dropped, in transit. When this happens, it is necessary to retransmit the missing TCP segment data. The IP and TCP protocols must work together to recognize and specifically identify missing data and request a retransmission from the source machine.

The IP packet contains fields in its header that hold both the source and destination machines' IP addresses. Among other things, this is useful in acknowledging successful receipt of a packet and for requesting a retransmission of a garbled packet. After the segments are properly packetized and addressed, IP sends datagrams to its own Ethernet (a data link layer architecture and protocol suite) protocols and the datagrams' network interface card (NIC).

The TCP segment's header includes a sequence number that identifies the specific piece of data that needs to be retransmitted, as well as a socket number that identifies the intended destination application. Together, the IP and TCP headers include all the information needed to successfully engineer a retransmission of the missing data.

Creating Ethernet Frames

Ethernet encases the packets with frames. Given that the origination machine must forward the datagrams through a LAN, regardless of where the datagrams will eventually be delivered, they must be encased in frames. Frames contain addressing that is recognized by the other data link layer devices on

An Introduction to Internetworking the LAN. This addressing is known as Media Address Control (MAC) addressing. Each frame contains the MAC address of both the source and destination machines.

Frames, like packets, may vary in length. Ideally, there will also be a one-to-one correlation between IP packets and LAN frames (Ethernet, in this example). It is possible, however, that some IP packets will be fragmented with each fragment occupying the data field of a different Ethernet frame. When this occurs, it is imperative that the receiving machine's LAN protocols recognize it so that the IP packets can be restored to their original form.

Next, the framed data packets are presented to the physical layer for conversion into a stream of binary digits (bits) that are transmitted to the destination machine's physical layer.

Creating the Bit Stream

The only layered functions that actually are adjacent and can communicate directly are those in the physical layer. Frames received from the physical link layer are converted into the appropriate sequence of 1s and 0s.

The bits may be transmitted as electronic pulses or flashes of light, depending on the transmission media being used. These physical signals are picked off the transmission media by the destination machine or by an intermediary networking device that may lie between the source and destination machines.

The processes that ensue upon reception of the transmitted bit stream vary slightly, depending on whether the recipient is the destination machine or an intermediary networking device.

0 0

Post a comment