How does the Internet Work?
You open your web browser and type in the address "www.oncomputers.info" and the web page loads. You open your chat client and connect to "irc.oncomputers.info" and are now able to join the chat room. You use your news reader and connect to "news.oncomputers.info" and can read the latest of what is going on in the On Computers newsgroup. And magically, this all works, most of the time. But, with all of the different internet sites that are out there, how does your computer know how to load the right one? Lets talk about how the internet works.
When you sign on to the internet, your computer (or your router, but for the sake of this discussion lets say you have a direct internet connection) obtains an IP address from a server at your ISP. Every IP address is unique to the different network you are on, but each address on the internet is unique. Every computer that is connected to the internet has an address, including every server. Along with an IP address, you also receive a gateway address and the address for usually two DNS servers.
Now that you are connected, you open your web browser and head to www.oncomputers.info. First thing that your computer needs to know is what the IP address of the server that is www.oncomputers.info. To do this, your computer needs to contact a DNS server to find the matching address. This is where the DNS server address I mentioned above comes into play. Your computer already knows the address of a server to send a request to. Your computer sends a request to the DNS server to request this information. If the DNS server doesn't have the address in its cache, it does a lookup to get the request. (There is a lot more involved in this, if you want more info, send an email to firstname.lastname@example.org and I'll consider it for a future article, but for the mean time, lets pretend its a black box.) Once the address is obtained and passed back to the requesting computer, a session is opened with the right server.
Now, lets say that one server happens to host the website, the chat server, and the news server. How does each computer know which server to contact? Each service runs on its own port. So, in addition to needing to know the IP address of the computer you want to connect to, you need to know what port on that computer to connect to. Fortunately, each application knows the appropriate port so this becomes a non issue. (Again, there is more at play here, but lets pretend its a black box.)
The end result of all of this? You get your web page in your browser, you chat with your friends, and you can read your news.
@ Copyright 2002 - 2003 by On Computers and the Videotex Services Coalition.