TCP/IP Introduction - PK Series

Dear Aspirants, 

We'll start with TCP/IP from today. OSI model has been quite influential in growth and development of TCP/IP. 

This article is a part of PK(IT) Series


Transmission control protocol/Internet Protocol (TCP/IP) is suite of communication protocols used to connect hosts on the internet. It uses several protocols, two main ones
being TCP and IP. Lets quickly understand the differences between OSI model and TCP/IP model:
  • OSI is a generic, protocol independent standard while TCP/IP is the standard around which Internet has developed. 
  • TCP/IP has 4 in comparison to 7 layers of OSI.
  • OSI uses bottom up approach while TCP/IP uses top down approach.
  • TCP/IP combines the OSI Data link and Physical layer into Network access layer.
  • OSI is reference model while TCP/IP is an implementation of it. 
Take a look at the diagram below to understand effectively.


The higher layer i.e TCP assembles the message into smaller packets. A header is added to the data which includes source and destination addresses, a sequence number, acknowledgement number and a checksum for error detection. At receiving end, TCP reassembles the packets in the correct order and routes them up to application. It retransmits a packet if error occurs. TCP's main job is to pack and unpack (encapsulation and decapsulation) the data and provide a reliable transmission of error free data.

IP layer transmits the packets over a physical layer connection. IP adds its own header (IPv4) to the packet, well known as IP address (32 bit addresses). This is the address assigned to device by Internet Assigned Numbers Authority (IANA). 

Encapsulation and Decapsulation

Packing of data at each layer of TCP/IP protocol stack is known as encapsulation. When data moves from upper to lower layers (outgoing), each layer includes some information (header) at the start of the block which is repackaged at lower and further lower layers with their own headers thus making data packet an encapsulated one. 

When data is received on destination's side, reverse process happens. Data moves up the layers (incoming) and each layer unpacks the corresponding header and delivers the packet to exact network application data waiting for it. 

TCP connection establishment

The 'three way handshake' procedure is used to establish a connection as it reduces the possibility of false connections. SYNchronize and ACKnowledgement segments are used as per figure below:

TCP connection establishment
As you can see Host A initiates the connection request with SYN which is received and acknowledged by Host B. A then sends acknowledgement for B's acknowledgement along with data. Data transfer between the two begins then.

TCP connection is duplex. There is no difference between two sides once the connection is established. 

Fun Internet fact of the day

Internet and 3G cell services are available at peak of Mt. Everest. 

(Video call to your gf/bf from the peak, sounds awesome, right?)

Deepak A

Join 40,000+ readers and get free notes in your email


Post a Comment

Thanks for commenting. It's very difficult to answer every query here, it's better to post your query on