Modems, Routers, Switches, and Hubs Explained

What’s the difference between a modem, router, switch, and hub? Have you ever heard some or all of these terms before but not really been sure how to tell them apart? Having worked in remote computer repair for several years, many customers have questioned us about this. In this article we will try to give the most human explanation possible, as well as try to present an easy to understand mental picture of how all of these things come into play.

Let’s start off with the IP address. An IP address is basically a set of numbers that identifies your computer as unique to the Internet. You may have even see them before, they look something like this: They are comprised of four octets, and each one can be a value between 0 and 255. The IP address of a computer is basically like a phone number for a person.

When this system was designed, it wasn’t a big concern at the time just how many computers would eventually be connected together. The initial application was of military or business nature, and personal computers were still yet to become commonplace. The maximum number of possible connections with this system, 4,294,967,296, seemed pretty reasonable at the time.

Now, if you’re a pretty resourceful modern computer user who has been at it for a while, you might find yourself inclined to open a new tab and Google the number of people in the world. And you would be on the right track; there were 6,755,235,700 people in 2009 according to Google’s public data explorer. This leaves 2,460,264,404 people without an IP address, if each person on earth were to use one computer.

How do we compensate for this? Again, we can use a telephone analogy – each group of people that have something in common (such as being in the same office) can just use one phone number with several extensions for each different person at the office. A secretary can answer the main phone number and transfer the caller to whomever it is they need to speak to. This secretary can be called a “router,” and this gives us a fairly clear image of the router’s role.

Meanwhile, the physical phone itself is the modem. All that the modem does is receive the data from your ISP, usually via a DSL or cable line, and convert it to the type of interface that the computers can understand. Much like you as a human can’t just cut a telephone wire in half and stick it in your ear and expect to hear a conversation, a computer also needs a special device to convert the signal into data that it can process.

It should be noted that in the recent years, the modem and router configuration has been fading away in favour of a single device that functions as both the modem and the router. This device didn’t really gain a new name, and it’s usually just referred to as whichever role it serves that is relevant. A good way to figure out if your device is a modem is if it takes its input from your RJ11 phone cable (DSL) or a coaxial cable (Cable). That automatically makes it a modem. What makes it a router too is if it has more than one output port, and/or if it also provides wireless output.

A modem will basically receive the signal and output it to a computer. This is the most basic function, and modems that only do this are referred to as “dumb modems.” A more sophisticated modem will also attempt to authenticate with the ISP. In other words, it will obtain its own IP address from the Internet and automatically forward it to the computer that it’s connected to. These were the first kinds of modems, back when DSL and cable were just starting out and most customers would only have one computer in their house.

Also, at that time, ISPs would allow you to have as many IP addresses as you liked. This became limited to just one IP address per subscription line as the issue of limited IP addresses being available became evident. In response to this, routers were sold to customers who wished to have Internet access to more than one computer per household.

Now that we have a pretty good understanding of the function of modems and routers, let’s move on to the other two – hubs and switches. If you’re just a regular user, or in other words, you have four or less family members (including yourself) who just use computers for casual purposes like e-mail, web browsing, and social networking, then you’ll probably never need to worry about hubs and switches. Also, with the advent and popularity of wireless networking, if you have a larger family you still might never have to worry about hubs and switches. And if we really get down to it, technically, you really should have no reason to ever worry about hubs no matter who you are. Just switches.

The purpose of a hub and a switch is similar – to split a network connection into multiple network connections. The first types of routers on the market were basically four-port routers. You could plug in four Ethernet cables into them, which would allow you to have four computers plugged in. Sometimes there would be bigger routers (especially for bigger businesses) but we won’t worry about that. We’ll just pretend that we’re in a situation where we have a basic modem that connects to a basic router, which outputs to four computers. And our fifth family member just got a new Dell for Christmas. And they want to make a MySpace account.

So, with wireless not yet being popular, and thus irrelevant to our situation, what do we do? We get a hub or a switch. A hub is the older device; a switch is the newer, smarter device.

A hub receives input into one of its ports, and then it sends this data out to all of its other ports. It basically echoes whatever information it receives to every device connected to it, like a cook at a fast food restaurant loudly yelling your order number for you to receive your burger. Everyone else in the restaurant can hear this information, but it is irrelevant to them, so they just ignore it.

A switch, meanwhile, receives input into one of its ports, checks whom it’s intended for, and then sends it just to that device. By contrast, it’s like a waiter that brings you your own food.

The main downside of the hub is that having a lot of data passing through simultaneously would lead to network congestion. Imagine if there were ten cooks yelling out orders at the same time, and if a customer didn’t hear their order, they would have to yell again (and again, and possibly again) hoping that no one interrupts them that time and that the client hears them. This would be a very awkward situation to be in for a number of reasons, but let’s suffice it to say that communication efficiency would suffer.

So in summary, the modem receives the initial Internet connection at your home, the router (which is sometimes built into the modem) then “splits” the connection to multiple computers on your network, thus allowing you to preserve the precious rare IP addresses of the world while letting multiple people at your location enjoy Internet access. If your router offers you wireless access and you’re alright with that, you can have hundreds of computers connected to just your router. But if you prefer the stability of the wired connection and have multiple devices, you need to add a switch to your network. Just take one of the outputs from the router and plug it into any port on the switch. You now have as many extra ports as the switch offers. You can also take another switch and connect it to another port on your router, or you can even take a switch and connect it to a switch. The connections will all be branched out and all the data will be delivered correctly, provided that a router resides over your local network. (Oh, and a hub is something you will never use unless you bought one at a yard sale.)