All communications on a network originate at a source, and are sent to a destination. The information sent on a network is referred to as data or data packets. Let host A be a source and let host B be a destination.
As shown in the Figure 5 real communication happens through physical medium while logical communication between host A and host B takes place on logical link between two peer layers. Hosts A and B communicate using peer to peer protocol of corresponding layer.
Figure 5: Communication between hosts |
If host A wants to send data to host B, the data must first be packaged through a process called encapsulation. (Figure 6).
Encapsulation wraps data with the necessary protocol information before network transit. Therefore, as the data packet moves down through the layers of the OSI model, it receives headers, trailers, and other information.
Once the data is sent from the source, it travels through the application layer down through the other layers. The packaging and flow of the data that is exchanged goes through changes as the layers perform their services for end users.
Network must perform the following five conversion steps in order to encapsulate data:
Figure 6: Encapsulation and Decapsulation |
As shown in the Figure 6. host B performs inverse process called decapsulation. First on physical layer it decodes bits and then each layer cuts its header and sends the data packet to the upper layer. In the end we have original data sent by host A. Each pair of adjacent layers communicate through interface. The interface defines which operations and services the lower layer makes available to the upper one.
PDU (Protocol Data Unit) is information that is used by peer to peer protocol.
SDU (Service Data Unit) is information that is sent through interface of pair of adjacent layers. (Figure 7)
Figure 7: Data Unit and Header |