Tuesday 30 December 2014

TCP/IP protocol layers overview - Application layer, Transport layer, Internet layer and Network Interface layer


Protocol: 

     Its like a language through which 2 machines can talk to each other.

TCP/IP protocol: 

     It is a family of protocols for communication between computers. 

TCP(Transmission Control Protocol): 

      TCP is responsible for breaking data down into small packets before they can be set over a network, and for assembling the packets again when they arrive.

IP(Internet Protocol): 

     IP takes care of the communication between computers. It is responsible for addressing, sending and receiving the data packets over the Internet.

There are 4 layers in TCP/IP protocol:(Each layer is nothing but a computer program running on every computer)

1. Application layer 
Eg: SMTP(for email), FTP(for file transfer), HTTP(for browsing)

2. Transport layer
Eg: TCP, UDP

3. Internet layer
Eg: IP

4. Network Interface layer


How TCP/IP layers work ?

1.  Applications talks to application layer. Each type of application choses different application protocol(SMTP, FTP, HTTP etc..) depending on the purpose. For example, when ever you type "www.example.com" in your browser, browser will talk to HTTP protocol in TCP/IP application layer. Application layer processes the application's request and talks to a protocol on the transport layer.
                       
2.  Transport layer divides the data received from application layer into packets and send them to Internet layer.
                       
3.  Internet layer adds IP address of the computer that is sending data and the IP address of the computer that will receive the data on each packet and send the packets to Network Interface layer.
               
4.  Network Interface layer sends the packets(called as datagrams in this layer) over the network.
               
5.  The packets transferred over the network are called frames. 
               
6.  Network Interface layer receives packets from network
       
7.  Internet layer receives the packets from Network layer and removes the addressing part.
       
8.  Transport layer gets packets from Internet layer and puts the packets received in order because they can arrive out of order. And sends acknowledgement to transmitter after ensuring that no damage happened to the packets. If no acknowledgement is sent, transmitter re-sends the data.
       
9.  Application layer gets the original data sent by the application.

Please find the above steps in the below diagram:




No comments:

Post a Comment