Saturday, September 20, 2014

TCP EXPLAINED

We all use the internet to do a lot of things. We use it to send email, to do social networking, to do online shopping and for various other purposes. However did you ever think or wonder how the internet works? What all goes behind the scenes and what infrastructure is involved in fulfilling all the requests you make on the internet; and enabling all the activities you perform online!
The internet architecture is a set of layered architecture. You act as a client, and your machine acts as a client system who is requesting services from various websites. The websites have various servers which cater to your requests. There are several logical layers which are involved at both client end and the server end through which your request passes. Imagine it similar to two buildings, you are on 10th floor of a building and you want to go to 10th floor of another building. You would go all the way to the ground floor, then walk or drive to the destination building, and then again go all the way to the 10th floor of the destination building.
There are various set of rules or what is technically called as protocols involved at each layer, which help in fulfilling your requests. One of such protocols is the TCP Protocol. The Transmission Control Protocol (TCP) is one of the core protocols of the Internet protocol suite (IP), and is so common that the entire suite is often called TCP/IP.  TCP provides reliable, ordered and error-checked delivery of a stream of digital information between two programs running on computers connected to a local area network, intranet or the public Internet. It resides at the transport layer, which is one of the layers of the internet stack. Web browsers use TCP when they connect to servers on the World Wide Web, and it is used to deliver email and transfer files from one location to another.
Transmission control protocol (TCP) is a network communication protocol designed to send data packets over the Internet. TCP is a transport layer protocol and is used to create a connection between remote computers by transporting and ensuring the delivery of messages over supporting networks and the Internet.
TCP makes it easier for computer programs to communicate with each other, typically over a computer network. When a program wants to send a lot of data, TCP is in charge of dividing the data, sending it through the network, and putting it back together correctly on a different computer. In the process, IP chooses which wires and "intersections" get used to send all the data pieces in the fastest way. It does this using packets.
If there are a lot of people using the network, it can get overloaded. Also sometimes weather, power outages, and other problems can make communication hard. Routers on the Internet use something called load balancing to try to fix some of these problems. But still, information can be delivered out of order, get lost, or even duplicated. TCP is designed to notice all of these problems and try to fix them. This can take a while, which is why the Internet sometimes seems slow. Once the TCP receiver has finally reassembled a perfect copy of the data originally transmitted, it passes that data to the computer program that asked for it. In this way, the program does not have to know about the network, and TCP does not have to know about the program's data.
We can relate what the TCP protocol does to the scenario when we order food from a restaurant. We request some food form the restaurant, the cook at the kitchen prepares the food, and the delivery boy delivers the food to our home. We again open the parcel, and enjoy the meal. The food is packed at the sourced and unpacked at the destination. Food is similar to the data which is passed over the internet from source to the destination. The delivery boy is similar to the transport layer, who ensures that the food is delivered in exact same conditions to the end point.
Hope the above explanations and examples were clear and you got a fair idea about the TCP protocol of the internet. 

 *I had submitted this essay as part of the Coursera IHTS course of University of Michigan. I am publishing this now as grades are declared. Please do not copy for any future sessions of this course. 

No comments: