Technology Explained: How Does a Router Work?Oct. 10th, 2009 By Guy McDowell
Lately, the Technology Explained articles have talked about the Internet and communications in general. This article will add to that series by explaining a very important piece of equipment – the router.
In order for a computer to connect to more than one other computer, you need a router or a hub. Two very different pieces of equipment that perform somewhat similar jobs. We’ll focus on the router since you very well may have one in your house.
Let me take a moment to explain to the more technically inclined that I understand that there are such things as token ring networks that don’t require a router or a hub. Yet, our average Internet user isn’t going to employ a token ring, so leave that alone, please.
Many of you will have wireless routers, a few of you may have wired routers. How the information gets to and from the router isn’t that important to this discussion. What is important is how does a router work – what happens inside the router with all that data coursing through it. To keep it simple, I’m going to use a 3 computer network to explain the routing principles.
So, let’s say you have three computers in your home and a connection to the Internet. This will give us a network that looks like such:
In the middle of that, is the wireless router. I know you knew that, but it had to be said. Wirelessly attached to it are a laptop, a PC, and a Mac (just for you Jackson!). Actually, the Mac is in there to show that the computers don’t necessarily need to be the same kind or platform. One might be sending up a file to work, one might be downloading something from YouTube and one is reading MakeUseOf.com – of course. All this information is coming down from, and up to, the Internet.
Believe it or not, the router can only talk to one of these things at a time! The process I’m about to talk about just happens so fast that it seems to happen all at once.
Let’s say that the Mac is uploading a file to work, the laptop is watching YouTube and the PC is surfing MakeUseOf.com.
Each communication happens in small packets of data. You might recall this from the How the Internet Works article I did awhile back. The IP address in that article was the important thing that allowed packets to find their way to your computer. Here’s a packet:
The important parts, for this article, are the Source Address and the Destination Address. These will be Internet Protocol (IP) addresses.
However, if you are using a router, your computer’s IP address is going to begin with either 198.168.0 or 10.0.0. This is because the powers-that-be decided that those IP address would be reserved for local network use. Like in a home network.
Here’s the catch. There are millions of local networks out there. So, at any point in time, there are millions of people using an IP address exactly like the one your computer is using on your home network. Your router will have to keep track of that AND tag the outgoing packets with the true IP address that your Internet Service Provider has given to your modem. I’ll call that the external IP address. How does the router do that? That’s the question.
I am going to oversimplify this, not to speak down, but to keep this article a reasonable length. The router takes your computer’s local IP address out of the packet’s Source Address and puts it in a table. It then puts the external IP into the packets Source Address space. The router also copies the Destination Address IP from the packet and puts it in the table associated with your local IP. Confuzzled? Me too. I really had to think about how to say this in everyday speak and not geek-speak. Here’s a picture:
When the packet comes back from that server somewhere out on the Internet, the Destination Address IP is now your external IP and the Source Address IP is now the IP address of the server sending you a packet. (Note: that is the IP address of Telus.com – not my home IP address.)
Think of it like a letter. You send a friend a letter and the return address is yours, and the send-to address is theirs. They write a letter back and the return address is theirs and the send-to address is yours. See how that works? We should write more letters.
Well, the router looks at the Source Address IP of the incoming packet and looks it up in the table as a former Destination Address IP. When it finds it, the router says, “Aha! Guy’s computer sent a packet to that IP address. His computer must be waiting for a reply! Here’s Guy’s local IP address so I’ll pull out the external IP address, pop his local IP address in and send it on its way!” That’ll do router, that’ll do.
You can imagine, with how many thousands of packets travel in and out of your home every minute, how fast this sorting process has to be! It happens so fast, you never even notice the fact that at one moment the router is talking to the Mac, then the laptop, then maybe the Mac again, and then the PC. Miracles everywhere – just stop and notice.
I hope you enjoyed this article on how a router works, and now have a better appreciation of what’s going on in that silly box of electronics next to your modem. If there are any other technologies you’d like me, or our other great writers, to break down for you, I’d be glad to hear about it in the comments!
Image Credit: A.Mohsen Alhendi
[ DOWNLOADS ] FREE PDF Guides from MakeUseOf
- 10 Essential Cheat Sheets To Download
- A Computer Geek’s Smart Productivity Guide
- A Newbie’s Getting Started Guide to Linux
- The Easy Torrent Guide for Everyone
- The Idiot’s Guide To Photoshop
- The Ultimate iTunes Manual
- The Idiot’s Guide To Building Your Own Computer
- The Laptop Buying Guide For 2009
All good useful stuff!
Update July 2014:
This post was part of a research project into social media and online communication that was originally published on my own personal blog Ffynnonweb in 2008. Ffynnonweb continues to undertake a journey across the changing online landscape, observing and chronicling developments in social technology and noting how they impact upon online communities – with a particular focus on opportunities in education known as ‘technology enhanced learning’ (TEL).
A full list of all the posts in the social media research project can now be found on this page Social Media Research: JA
On a cold and grey Chicago morning..
It is sometimes difficult to know where to begin when discussing the history of online social networking and communication, but in terms of nice, round numbers, it may be noted that the earliest Public Bulletin Board Service (PBBS) was invented exactly 30 years ago in 1978 by Ward Christensen and Randy Suess in a Chicago blizzard, apparently.
This then becomes the starting point for our journey.
In contrast to the closed academic networks previously available, these public access bulletin boards allowed users to dial into the system via a telephone line and use a terminal program to upload and download software, play games, and read news but above all – to connect socially with other users in discussions using message boards. The system was envisaged as a computerised version of the cork notice board where users pin notices, requests for information, assistance and so forth. Initially, PBBS were purely locally based due to the prohibitive expensive of long-distance call charges.
The popularity of these systems began to wane with the rise of the Internet in 1996, although some bulletin boards did subsequently connect to the Internet, providing email and Usenet3 newsgroups and services and attracting users from a wider geographical area. Bulletin Board Services are still active today, although they now serve more of a niche market.
CIX (Collaborative Information Xchange) Conferencing began as a Fidonet Bulletin Board Service in 1983 but was relaunched commercially as CIX in 1987. CIX was able to offer a nation-wide service in the UK by providing multiple PoPs (Points of Presence) situated in major metropolitan areas to allow the majority of subscribers a local-rate connection. At its heart were ‘conferences’ of subscribers connecting to discuss a wide range of topics using an offline reader AMEOL Again, social interaction proved to be the main attraction for the users. This service was funded by a monthly subscription and in 1988, CIX provided its users with the first commercial email and Internet access in the UK.
Between 1989 and 1993, the WorldWideWeb program was invented by Sir Tim Berners-Lee on a NeXT workstation and the idea grew rapidly in popularity due to its exciting new graphical nature. In 1993, the NCSA Mosaic browser (developed by Marc Andreessen) was launched across multiple platforms and captured the public imagination.
During the same period, (1989-93) CIX grew rapidly, reaching a peak of more than 16,000 users in 1994, before starting to lose customers to the newly-formed Internet Service Providers that provided free access to the Internet and the burgeoning World Wide Web using 0845 Dial-up, companies such as Demon, Pipex, AOL and Freeserve.
CIX has re-invented itself over the years and now, as with bulletin boards, also serves a niche, mostly business-oriented, conferencing market. It remains very popular with its loyal private users however, for whom the offline reader (OLR) is its main attraction, as this extract from a testimonial on the CIX website demonstrates:
“My main source of interest, discussion, information, and friendship is a BBS called CiX. It’s a conferencing system with several thousand active
members, based in the UK but with users in many countries. It’s hard to describe unless you’ve used it: it’s something like Usenet news, and a little like a blog, but far better than either. There are hundreds of conferences ranging from the technical to the whimsical, the supportive, the political, the humorous, the fascinating, the commercial, and the instructive, each with its own membership and style – and anyone can set up new ones. The Windows OLR is called Ameol, and is a great email and news client, but there are many other OLRs for many platforms. I do all my Cixing on my Psion, for example – I can collect hundreds of new messages over my mobile phone and then sit reading them on the train! (Try that with a web site :)”.
The majority of these new companies merely provided a conduit with no services of their own. It was Sir Tim Berners-Lee’s World Wide Web – combined with the Mosaic browser – that drew the attention of the masses to the potential of the Internet, so much so that the World Wide Web has now become synonymous with the Internet.
AOL (America Online) was different from the other ISPs mentioned above, in that it began as a company providing interactive online gaming and chat services to subscribers through its own client software that featured a graphical user interface in the days when everyone else was still using terminals. AOL (like CIX in the UK) also emphasised communication among its members as a feature. The proprietary nature of the AOL software and the fact that it delivered content to subscribers only in what has been termed a ‘walled garden’, has had an adverse affect on its popularity over the years, beginning with its merger with Time-Warner in 2001 and resulting in the sale of many of its subsidiary companies world-wide (AOL UK was sold to Carphone Warehouse in 2006) and substantial employee layoffs at the end of 2007.
The other big name of that early period – CompuServe – (founded in 1969) was a major information and networking services company by the mid-1980s. The CompuServe Information Service (CIS) was the first commercial online service in the US, offering a limited email service to commercial customers from 1989 and enormously popular online forums during the 1990s. These were used initially by technical computer companies offering customer support but soon broadened to include the general public in areas such as entertainment. With the growth of the World Wide Web, these support forums gradually closed as companies and users migrated to company websites instead and CompuServe began converting its forums from its own proprietary software to html in 1997.
CompuServe was subsequently split into two parts with its networking sold to Verizon and the Information Service to AOL.
Another method of online communication that has been in use for many years is Internet Relay Chat (IRC) which is a form of ‘synchronous conferencing’ – to use the more technical term for online chat technologies. It requires the use of client software to connect to ‘channels’ or ‘real time discussion forums’ which can be easily created by users on a variety of topics. Individual private messaging is also supported. A range of cross-platform IRC Clients is now readily available, including add-ons for web browsers and Instant Messaging Clients. The IRC is particularly popular with the online gaming community as it can be used in conjunction with many multi-player online games.
Read the next article in the series:
Evolution to the Web.
Update July 2014: A full list of all the posts in the social media research project can be found on this page Social Media Research: JA