Skip to main content

What is TCP/IP ?

What is a protocol?
When two computers needs to communicate between them and in order understand each other it s better if both computers follow common format when they are communicating. That is where the protocol comes into the picture. Protocol is set of rules and procedures which provide to establish a meaningful communication. Protocol specifies,

  • format to use
  • when data should be send
  • order of the data
  • error codes
  • what data mean and etc.


Example from day today life




What is TCP/IP?
In order to do a better end to end communication via network we use protocol. That special set of rules and procedures used for Internet are called TCP/IP. Now lets go in to the more deep in TCP/IP.



How TCP/IP Works?
Network protocol can easily described using OSI model.


Application and Presentation Layer
Describe the programs like your web browsers we directly interacted with. This layer has protocols ,If you visit web site protocol is HTTP and for mails SMTP and etc.

Transport and Secession layer
This is where TCP comes in. After application layer gets data ,your application talks to Transport layer using ports. Each port can be assigned to different protocols in the application layer then TCP can easily identify where it is comes from as an example most data comes through your web browser comes to transport layer through port 80 which is http. Then the data break down to no of data packets called datagrams like shown in above diagram 1.0 where there are individual from one another because they can find the quickest root over the Internet and reach to the destination.

In order to reassemble data properly on the other end,TCP introduce header for each datagram describing on what order the packet should be reassembled and error checking to check whether any datagram is missed when routing.

Network layer
Then packets arrive network layer where Internet protocol /IP is operated in.It patched origin and destination ip addresses. To the datagram Then datagram know where it is coming from and where it should be go.

Data link layer
The Data-Link layer ensures that an initial connection has been set up, divides output data into data frames, and handles the acknowledgements from a receiver that the data arrived successfully. It also ensures that incoming data has been received successfully by analyzing bit patterns at special places in the frames.

Physical layer
Convert data in to electrical imposes.






Why TCP/IP?

  • Connection based
    As an example when we start up telephone conversation with our friend we know that your he /she is receiving the message or not. But when we send a letter then it is difficult to ensure whether the friend has been relieved it or not. Connection based mean just like the telephone conversation.
    Before send data there is a negotiation happens between the 2 ends. This is known as 3 ways handshake. Sender ask from receiver to set up the connection once the receiver end replied to this request then sender acknowledge that connection has been established. Once sender send a data packet to receiver and once receiver received the data packet it send an acknowledgement to the sender informing that I have received the data packet. This is why TCP data segments carry with a number.
  • Retransmission
    If any case the data packet lost and sender did not receive acknowledgement from receiver ,Sender used to send data packet again to the receiver end.
  • In-order delivery
    Since Datagrams are numbered, when datagrams received out of order It can be easily rearrange before sending them to the receiver application.
  • Congestion control
    When network network congested it delays the transmission of packets in order to minimize the packet lost.
Why not TCP?

  • Bigger Header
    Since TCP header is 6 times larger than UDP header.
  • Side effect of congestion control
    Since it delays transmission data doesn’t get sent out immediately.
  • Bigger overhead
    Since retransmission and acknowledgement is happens it makes overhead















Comments