Sunday 12 February 2006

How the internet works and what it does



Recently, if you've been subscribing to Security now, you might have already heard the How the internet works podcasts (part one and part two) by Steve Gibson and Leo. I seemed to like both of the podcasts equally, because I know about terms like TCP and UDP and so on before, so I didn't have a problem to understand what Steve was talking about. And since Steve's explanation wasn't exceptionally good (well atleast it looked to me like many people might now have grasped the major concepts) I decided to make my summary of what Steve talked (or explained rather) about in the podcasts, and yes it was also an assignment. This post is a little big so just browse through it and just pay attension to the bold words if you are like me and hate reading through a heap of information.

To understand how the internet works we need to understand that internet is made up of.
The internet is basically a network of computers and routers in which data is transferred from one point to another. The data is called 'packets' in this case, because the data is grouped together when it is sent from one point to another.
In order for this data to go from one place to another the packets have to follow a set of rules (well sort of) and thats why there are something called 'protocols'. Protocols enable packets to be sent in an orderly fashion and in different ways.

The internet is based upon something called the Internet Protocol or commonly referred to as IP, which is basically a set of rules that governs the way packets are moved across the network. It takes care of where the packets should go and so on. IP is a very vast term so I could just go on and on, but I'll just stop here, and perhaps make another post on IP only.

In the Internet Protocol there are several other protocols that govern the specefic parts of how packets are transferred and where there are transferred and so on. You can read about them here. All of the different protocols are part of the Internet Procotol Suite and were invented for a specefic reason (and each protocol has its own way of doing things)

The different types of protocols:

Transmission Control Protocol (or TCP)- This is one of the main protocols, that is used a lot on the internet. Its main job is to exchange packets, or to transfer packets. Something like this happens in the TCP when we use it to transfer packets-
- The host computer and the computer that you are on make connections. Then the data is sent in manageable packets, and the packets are cut up by the protocol to be sent. This means that TCP is doing a lot of work for you and you don't need to worry about the size of packets and so on. This means that the transfer of packets over the network is going to be taking more work from the protocol, and that's why it is called a heavy protocol by Steve in the podcast.

User Datagram Protocol (or UDP)- This is also a protocl in which the packets are transferred from the source (the place from where the packet is sent) to the destination (the place where the packet is supposed to reach). However this is a little bit different from the TCP protocol because in this protocol the data being sent is not looked after by the protocol, the protocol just sends the data to the source destination so it doesn't bother (well, that's the way the protocol was designed to be) to break it up and send it piece by piece. This makes this protocol a much more lightweight protocol and because you need to look after what data is being sent and so on.

There are may other protocols that are designed for a specific purpose for different needs, like VoIP (for voice) and FTP (for transfering files), however I won't go over them in much detail.

What are routers?
Routers are used in networks (like the internet) to pass on the data, so basically whaty a router does it get the data and transfer it to the destination (the place where it is supposed to go to) How a router sends the information where it is supposed to go is also something very interesting.

What a router does is looks at the first digits of the IP address (the address which is assigned to a device) and then it forwards it to the other router, then the other router looks at the next digit and forwards the packets to the next router. It's just like mail... we first look at the country and the mail is sent to that country, then we look at province and the mail is sent to that province and then we look at the city and the mail is sent to that city and that's how the routers narrow it down until the last router sends it to your computer. And there are also different kinds of routers such as NAT Routers and so on.

What is TTL? And why do we need that stuff...

TTL or Time To Live is something that programmers (the first creators of the internet) have included in the Packet. What this does is limits the packets time until it can be used. When the time expires the packet is discarded, or sent back by the router. The router sends it back to the source (it knows what the source is by looking at the header in a packet... always remember a packet always has the source and destination address in it!) This can be useful when you want a packet to expire... like for security reasons. TTL can also be used for something called trace route... it is basically trying to get to the host by getting the address of the path it takes, because when you send a packet and it expires the packet has the IP address of the router that sent it back to you. So if you repeat this step for every router (increasing the TTL value every time) you can find out the host, which is not good for the host of course.

The history of the internet
Sometimes it is easier to understand stuff if you know the history. Well okay may be not... but it is always good to know the history of where things come from and so on so here is how the internet came into existence...
Long long ago people wanted to connect computers together, and then the genuis people at MIT and Stanford (I think) came up with the ideas of packets. Data that could be sent through a network from one place to another. And that's how they developed upon this idea and finally came up with the Protocols that we have today.

So now you know how much work went into creating the internet and this post doesn't even talk about all the things that make up the internet. I hope that now you too can appreciate the internet as you use it in your everyday life!

Note: Steve also talks about the Kama Sutra virus in the podcast (heh, the name is pretty funny) and how malicious it is. I didn't say much about it in this post since it is 'yesterdays news', if you are still curious you can hop over to Gazotto, and read about the virus...
, , ,




Got a question, tip or comment? Send them to beyondteck+question@gmail.com and we'll try to answer it in a blog post!

No comments:

Post a Comment