Sunday, March 22, 2009

Protocol Data Unit (PDU) - Process of Network Data Encapsulation

Within the layer in the OSI Reference Model, the communication between layers higher than layer one is logical; the only hardware connection is at the physical layer. Communication take the form of some sort of message that is sent between corresponding software elements on two or more devices.

Since these messages are the mechanism for communicating information between protocols, they are most generally called protocol data units (PDUs).

In order for a protocol to communicate, it must pass down its PDU to the next lower layer for transmission. Lower layers in OSI model are said to provide services to the layers immediately above them. One of the services each layer provides is this function: to handle and manage data received from the layer above.

At any particular layer N, a PDU is a complete message that implements the protocol at that layer. However, when this “layer N PDU” is passed down to layer N-1, it becomes the data that the layer N-1 protocol is supposed to service. This layer N protocol data unit (PDU) is refered to as the layer N-1 service data unit (SDU).

The application or higher layer understands the structure of the data in the SDU, but the lower layer at the interface does not; it treats it as payload, undertaking to get it to the same interface at the destination. The job of layer N-1 is to transport this SDU, which it does in turn by placing the layer N SDU into its own PDU format, preceding the SDU with its own headers and appending footers as necessary. In this process, the entire contents of the higher-layer message are encapsulated as the data payload of the message at the lower layer. This process is called data encapsulation and takes place at each layer of the OSI reference model.

Layer N-1 will subsequently pass the PDU down to the next lower layer, where it is treated as a layer N-2 SDU. Layer N-2 creates a layer N-2 PDU containing the layer N-1 SDU and layer N-2’s headers and footers. This process will continue, all the way down to the physical layer. In the theoretical model, what you end up with is a message at layer 1 that consists of application-layer data that is encapsulated with headers and/or footers from each of layers 7 through 2.

In general, a PDU, regardless of the protocol layer-consists of header required by that protocol and data fields. The header may may contain control information necessary to get the PDU to the peer entity and typically includes the source and destination addresses appropriate for that layer as well as error sequence and flow control information.

These PDUs are passed to a matching protocol layer further along on the data's journey to destination. The matching layer, or "peer", decodes the data to extract the original service data unit, decide if it is error-free and where to send it next, etc. The physical layer converts the PDU to a series of bits and sends it across wire to the destination (or an intermediate) system.

On the receiving device, the process of encapsulation is reversed. The remote system reassembles the series of bits to form a frame and forwards the frame for processing by the link layer. This removes the link layer header, and passes it to the next layer. This process continues until finally the original packet data is sent to the remote application program.

Each PDU has a specific format that implements the features and requirements of the protocol. PDUs are relevant in relation to one of the first 4 layers of the OSI model. The Layer 1 PDU is the bit. The Layer 2 PDU is the frame. The Layer 3 PDU is the packet. The Layer 4 PDU is the segment (e.g. TCP segment). Layer 5 and above are normally referred to as data.

No comments:

Post a Comment