What's the difference between a hub, a switch and a router?
Hi, everyone. Leo Notenboom here for AskLeo.com.
It's really common to talk about these networking devices that we supposedly have
in our home or in our businesses and not really have a good understanding
of exactly what they are, what makes them special?
Let's review some of the common devices that you're likely to encounter when
building out a network, why they do what they do and how they're different.
The biggest single difference between the three devices that I've just talked
about is what I'll refer to as intelligence.
They are increasingly smart devices.
I'll start with the hub.
A Hub is essentially a very, very stupid device.
Basically, what it does is - anything that comes in on one of its connections is
immediately transmitted to the other connections, all of them.
Anything that comes in on one of those connections is then immediately
transmitted on all of the other connections.
There's no intelligence.
It's not trying to figure out what's where.
It simply says, if I get it, I got to send it to everybody.
That's it.
That really is the rule of thumb for a hub.
So what that means is if you're having
a conversation on a hub, you're networked through a hub,
then every other device on that hub can, quote, unquote, see the conversation.
It's one of the ways that network
engineers can insert themselves into a conversation simply by inserting
a hub into a connection and then connecting up to one of the other ports,
which then gets a copy of everything that's going back and forth.
Hubs aren't as plentiful as they once
were, and that's because prices have been coming down.
Switches are the next most intelligent device.
They operate, in a sense, very much like hubs.
You have a connection, you have multiple devices all connected to this machine.
There is no one connection that's any more special than the other.
But inside the switch is actually a small computer, and this time,
it's actually paying attention to the data that's crossing it.
When it starts up, it doesn't know anything, and that's fine.
That's a starting point.
As soon as it gets a message from a computer on any of its connections,
it now has enough information to know that that computer is on that connection.
So, for example, it gets a message from the outside world.
That message is for, I'll call it, computer A.
The very first time that it gets a message
for computer A, it doesn't know where computer A is.
So it sends that message out to all of the other ports, not unlike a hub.
But then computer A responds,
and computer A responds only on the connection, of course,
that it's connected to that tells the switch, oh, computer A is on this Port.
And from there on out, whenever a switch gets a message
for computer a, it only sends it out to the Port that it knows computer A is on.
Eventually, it builds up knowledge of which computers are connected
to which of its connections, and then can start routing the data
efficiently only to those connections on which the target computer lives.
In the long run, this actually ends up
being a very, very efficient way to optimize your network.
You're not throwing a lot of traffic to all of the other connections
on a switch unless there's actually a device you expect to be there.
Routers are the workhorse of the Internet.
They're the workhorse of your home. Routers are truly intelligent devices.
They are small computers.
In fact, many of them run a variant of the Linux operating system
on the inside, configured to be dedicated to this task of routing.
Well, what does routing really mean?
Well, in a sense, it's very much like switch in that it
learns what's where it sends the data to the right Port.
It learns which machines are on, which ports, and so forth.
But there's more to it than that.
Routers can be configured to treat certain traffic differently.
They can be configured to give
preferential treatment to certain types of protocols.
They can be configured to allow only
certain kind of connections from certain ports.
That becomes important because on a router, one of the ports is usually
considered special, and that's the connection to the Internet.
The connection to the Internet is, by design, shared by the router to all
of the machines that are connected on the other ports, so called local ports.
What that means, though,
is that the router actually has to do a fair amount of smart work,
usually referred to as Net routing, network address translation.
And I've got a complete article on exactly what that means.
But the bottom line is it's what allows you to share a single Internet connection
and a single IP address with multiple devices on your local network.
That requires a router,
that requires the intelligence of a router in order to make that happen.
If you have nothing else in your home,
there's a really, really good chance you have a router.
It's the box that's connected up to your
Internet and to which you connect either wired or wirelessly your machines.
Now, that actually opens the door to another part of I'll call it confusion.
And that is where wireless enters into the fray.
First of all, we need to talk about a wireless access point.
A wireless access point is, in a sense, a hub for wireless communication.
It usually has one wired connection
and then can connect to some number of other devices.
Wirelessly.
Its only real job is to take information
that comes in from the wire and send it out on the antenna and take information
that comes in wirelessly on the antenna back out to the wired connection.
That's it it's not a very smart device.
Its job is simply to translate from wired to wireless connections.
However, there is such a thing as a wireless router and unfortunately
a wireless router is often misunderstood by most people.
A wireless router is nothing more than a router like I've already talked about
with a wireless access point like I've already talked about built into a single
box that's it it's both a router and a wireless access point.
Unfortunately, where people get confused
is that they will think a wireless router can be used as a wireless access point.
And while some can sometimes be configured to do so, that's not their intent.
If you're trying to extend your network and you already have a router,
what you really need is a standalone wireless access point.
Finally, a quick note about speed.
All of these different devices come
with maximum speeds, I'll call it there are different versions
of the various interfaces or wireless protocols that would be used.
The good news is that for the most part all of the devices are autosensing.
So if you connect up two gigabit capable wired devices you'll get a gigabit.
If you replace one of those with 100
megabit maximum wired device then both sides will kind of sort of figure it out
and operate at that 100 megabits but realize that the speed of whatever it
is you're doing is throttled by the slowest device in the chain.
Nine times out of ten, the slowest device in the chain is
the internet connection you're getting from your ISP hope that's helpful.
The companion article for this video
includes diagrams, a few more links that I think will be helpful.
It's a place for comments and of course
it's where things get updated dated as information becomes available.
That's at askleo.com/1862.
I'm Leo Notenboom. This is askleo.com. Thanks for watching.