When a client needs to transmit data across the network to another device an important process happens. This process is called encapsulation and involved adding protocol information from each layer of the OSI model. Every layer in the model only communicates with it’s peer layer on the receiving device.
In order to communicate and exchange information, each layer uses something called PDU which are Protocol Data Units. These are extremely important and contain the control information attached to the data at each layer of the model. It’s normally attached to the header of the data field however it can also be attached to the trailer at the end of the data.
The encapsulation process is how the PDU is attached to the data at each layer of the OSI model. Every PDU has a specific name which is dependent on the information contained in each header. The PDU is only read by the peer layer on the receiving device at which point it is stripped off and the data handed to the next layer.
Upper layer information only is passed onto the next level and then transmitted onto the network. After this process the data is converted and handed down to the Transport layer this is done by setting up a virtual circuit to the receiving device by sending a synch packet. In most cases the data needs to be broken up into smaller segments then a Transport layer PDU attached to the header of the field.
Network addressing and routing through the internetwork happens at the network layer and each data segment. Logical addressing for example IP is used to transport every data segment to it’s destination network. When the Network layer protocol adds the control header from the data received from the transport layer it is then described as packet or datagram. This addressing information is essential to ensure the data reaches it’s destination. It can allow data to traverse all sorts of networks and devices with the right delivery information added to subsequent PDUs on it’s journey.
One aspect that often causes confusion is the later where packets are taken from the network layer and placed in the actual delivery medium (e.g. cable or wireless for example). This can be even more confusing when other complications such as VPNs are included which involve routing the data through a specified path. For example people route through a VPN server in order to access BBC iPlayer abroad like this post which will add additional PDUs to the data. This stage is covered by the Data Link layer which encapsulates all the data into a frame and adds to the header the hardware address of both the source and the destination.
Remember for this data to be transmitted over a physical network it must be converted into a digital signal. A frame is therefore simply a logical group of binary digits – 1 and 0s which is read only by devices on the local networks. Receiving devices will synchronize the digital signal and extract all the 1s and 0s. Here the devices build the frames and run a CRC (Cyclic Redundancy Check) in order to ensure it matches with the transmitted frame.