Thursday, April 14, 2011

How does the OSI Model function?

OSI Model is a combination of Seven Layers which we already discussed. Now how those layers works for communication through Network, this works in a form called Encapsulation and Decapsulation.

            Data sending end encapsulates the data and receiving end Decapsulates the data.

Encapsulation:

In the above example the data from the computer has been sent through Internet to another computer. Application Layer is which user work assume that we are sending Mail to our friend. The data is now sent to Presentation Layer.
Presentation Layer converts the data to ANSII coded file which the other computer can understand. Then the data sent to Session Layer and then to Transport Layer.
Transport Layer cuts the data in to several pieces and Sequence Number is been added to each piece in order to rearrange it properly by the receiving end. Then TCP header is added this encapsulated part is called Segment. Now the segment is sent to Network Layer.
Network Layer adds from address and to address which we call Source IP address and Destination IP Address in order to route the packet through the internet. In this layer the encapsulated data is called Packet. Then packet is sent to Data Link Layer.
Data Link Layer encapsulates the Packet with Source and Destination MAC Address and at the end FCS (Frame Check Sequence) for error checking is also added. This type of encapsulated data is called Frame. Now the frame is sent to Physical Layer.
Physical Layer converts the frame into digital signal which can transmit through the Network Cable. Now the data has been sent through the Physical Medium.

Decapsulation:

Decapsulation is the process which happens at the receiving end.
Physical Layer receives the signal that we sent in the previous section, now the signal is converted to frame and sent to its upper layer which is Data Link Layer.
Data Link Layer checks the MAC Address to confirm that this frame has been sent to this computer, after confirmation it performs the CRC (Cyclic Redundancy Check) to know the frame is corrupted or received properly. Then the information that was added by the remote Data Link Layer has been removed and sends the packet to Network Layer.
Network Layer verifies the IP address in the packet with its own IP, if it matches then the remote Network Layers information has been removed and sends the Segment to Transport Layer.
Transport Layer rearranges the Segment with its Sequence Number and sends an Acknowledgement to Remote computer that it received the data properly or not. Here TCP is used for the transmission, click here to know more about TCP. Then data has been sent to its upper layer, so that the user received the Mail that was sent by us in the previous section. :)

No comments:

Post a Comment