G’day,
Since I haven’t had any other requests to explain stuff, I have had to dip into my secret stash of questions. This episode’s question is something that my fiance asked me a few weeks ago in relation to her University course (website design). She had heard it talked about, but couldn’t quite gel with what she understood.
TCP/IP
OK, first thing’s first, what is it? TCP/IP stands for “Transmission Control Protocol / Internet Protocol” and as the “/” suggests is actually the combination of 2 protocols. For those that don’t know, a protocol is basically a set of rules that define how something is supposed to work. So, lets break this down into it’s component parts and what they do and then show you why they are referenced together.
IP
Internet Protocol is probably best explained first. When computers talk to each other, whether in the same room or on the other side of the globe, they need to know how to get to the computer that they want to communicate with. We humans use street addresses or phone numbers to get in touch with each other, and since we built computers we have a similar method for them to use. Every computer has what is called an IP Address (and yes, IP means Internet Protocol), which for everything to work correctly has to be unique. So when a computer wants to talk to another computer, it just “dials” the other computer’s IP address. I will go through how computers look up the IP address in another episode of Ask Engie.
Packet
For the next part of this to make sense, you will need to know what a “packet” is. A packet is, simply put, the smallest amount of data that a computer sends across a network. A packet is kind of like an envelope; it has the address of the computer that is sending it, along with the computer it is going to as well as some “stuff” that is being sent. For example, to view this web page, your computer sent packets to the web server asking for the page, and the web server sent the page over in packets
TCP
Transmission Control Protocol has two purposes. Firstly, it allows data to be broken down into smaller pieces (aka packets) and sent across a network. Secondly it is a way for both computers (sender and receiver) to know that everything has been received correctly.
Alluding back to the web page example, let us say that your computer has asked for this web page from the web server . The web server sees that you want this page, but it is too big to try and send as one packet, so it breaks the page up into smaller pieces and numbers them. It then starts sending out the packets in sequential order. Your computer receives the packets and collects them, taking note of the numbers.
Now, a network can be a scary place for a simple, lowly packet and sometimes they get lost – either lost completely or they just take too long to where they are going.
If your computer notices a break in sequence of packets it has received (say it gets packet 1, packet 2 and then packet 4) it assumes the missing packet is lost for good and tells the web server to start again from the last good packet it received (in this case packet 2). The web server then stops and starts again from the requested packet. This continues until all of the web page packets have been sent. The web server then sends one more packet to your computer to tell you that you have everything it sent, and voila, your web page appears in your browser.
And Then . . .
So TCP is how to send data across a network. IP is how the computers find each other on a network. Individually, these protocols don’t let you do much. What is the point of knowing how to find a computer if you can’t talk to it and vice-versa. Put them together and you have a way for computers to send stuff to each other! A TCP/IP packet is made up of a sender’s IP Address, recipient’s IP Address, sequence number (what I called the packet number in the example) and finally the data (or part thereof) that is being sent.
Thankyou for reading all the way to the end. I hope that you were able to follow my explaination, whatever your level of expertise. If you would like something explained better or would like to ask me to explain something else for you, go ahead and leave a comment below!
Pożegnanie, see you next time.
-Engie