Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

8/27/05 Routers, switches, and hubs, oh my!

Aug 24, 2005 5:03AM PDT

Members, thank you for your participation in this week's topic. And a huge thank you goes out to those who took the time out to write out some really extensive explanation for Andrew on routers, switches, and hubs !

While many advice from our members do somewhat overlap, please don't undermine another person's explanation because they are all great, so I encourage you to read through them all. As always, if you have more questions to ask about the topic or have any additional advice to offer, please by all means participate and add to this week's thread.

Take care and thanks again everyone!

-Lee Koo
CNET Community


Question:

I'm trying to connect three PCs in my home in order to share
my DSL Internet access. In my research, I keep reading about
routers, switches, and hubs. I can't make heads or tails out
of it. What's the difference? Do I need all of them? Don't
some of them have firewalls built in, or do I need one for
each computer? The machines are running Windows XP. Thanks.

Submitted by: Andrew C. of Lawrence, Kansas

(Winning answers and other submitted answers found below)

Discussion is locked

- Collapse -
double hmmm
Aug 28, 2005 8:08AM PDT

In addition to last message... I have spoken to another friend who has managed what you are doing. Maybe standards have changed, or the fact that you are using single computers connected to each port works differently from connecting multiple computers to each port.
Wish I could have answered your question better but my knowledge seems to be limited here.
Gary.

- Collapse -
Thanks
Aug 29, 2005 11:06AM PDT

Gary,
Thanks for all of your help and research.
I bet you are right about the computers working because of using seperate ports instead of sharing a common port on the Router Lan..
The important thing to me anyway is that my system works.
I was really confused there for a while.
Sometimes I don't see the forrest, for the trees.
Thanks again.
-trent-

- Collapse -
MAC Address
Aug 26, 2005 2:57PM PDT

In your description you said that the computer sends the destination IP and MAC address in the packet. How does my computer know any other computer's MAC address ahead of time. Wouldn't all of the routing actually depend on the IP address (at least until we encounter a switch that knows the MAC addresses of the computers attached to it)?

Robert

- Collapse -
the computer knows.
Aug 26, 2005 6:09PM PDT

see on a network all computers are constantly communicating. they regularly send out information onto the network that says ''hey, im a computer and my IP address and MAC address are ...''. So all computers know the IP and MAC addresses. Else they would ask each other. Just IP address is not enough to send a packet on a network.

That might raise the question 'how does my computer know the MAC addresses of computers on the internet'. the answer is it doesnt. it doesnt even know their ip addresses. you time in an address like www.cnet.com and the computer contacts a server that can resolve this name into the required addressing information.

Gary.

- Collapse -
correction to last message
Aug 26, 2005 6:17PM PDT

actually after posting the last message i felt it was a litle inaccurate. let me restate that:

computers dont store the MAC addresses of the other computers on themselves. If a computer knows the IP address of the destination computer, it will send out a message on the network saying ''i am trying to reach this IP address xxx.xxx.xxx.xxx If that is you, tell me your MAC address''. and so the destination computer replies with its MAC address. And then communication is possible.

[computers do send out messages regularly saying ''i am a computer and this is my IP and MAC address. that information is usually picked up and stored by the switches and routers.'']

sorry for the mix up.

Gary

- Collapse -
Routers and switches
Aug 27, 2005 1:14AM PDT

It seems to me that quite a few routers come with a switch capability.

- Collapse -
Routers
Aug 27, 2005 3:23AM PDT

Hi Gary, I have just read the comprehensive reply that you have just given to Andrew. Could you please tell me what is the maximum length of cable one can use between a router and say two computers, maybe in adjoining houses, using broadband?
Many thanks, John Steer, in Spain.

- Collapse -
use repeater/hub
Aug 28, 2005 8:18AM PDT

I have been out of this field for a while. But if i remember correctly, the rule was that CAT 5 cables over 100 meters in lenght start decreasing in performance. This is because the signals being carried over the cable start decreasing in strength and so data can be lost.

Once upon a time people used a device called a repeater. The cable came in thru one port of the repeater and another cable connected to the other port. Whatever signal came in through one port were reenforced (made stronger) and repeated out through the other port.

Today you will be hard pressed to find a repeater (except wireless repeaters which are generally known as range extenders). But if you remember, in my article I called a hub a multi-port repeater. Thats because it works in the same way, except that it has many ports so it can repeat the signal out to many computers.

So what you can do is put a hub in the center, or maybe two hubs, and connect them in a chain ie computer-hub-hub-computer or any such combination. I think you get the picture.

Gary

- Collapse -
Hubs, Routers and Switchers
Aug 27, 2005 1:03PM PDT

Great article by Gary P.

We need more of this clear concise information in layman's terms as Gary wrote it...


Thanks again!!

Frank

- Collapse -
>
Aug 28, 2005 8:09AM PDT

you're welcome.

- Collapse -
Hubs, Switches, and Routers
Aug 27, 2005 2:09PM PDT

Gary's explanation was good except when it came to routers. It is not true that if three computers on a network are connected to a router, communication between them will be blocked by the router. If that were true, the computers on my network couldn't talk to each other but they do. The other statement that caught my attention was his comment about connecting to broadband. If you have a three or four port router (which is very common and inexpensive now) you do not need a hub. Just plug each computer into the router.

Roy

- Collapse -
Hubs, routers and switches
Aug 28, 2005 3:55AM PDT

Excellent explanation....except for one thing. Many, if not most comsumer routers come with a built in switch or hub. Your explanation will be confusing in this situation, because you CAN hook up all of your computers to the router and communicate between the computers.

- Collapse -
Why need a hub with a router?
Aug 28, 2005 4:34AM PDT

Greg, first of all please allow me to commend you on an excellent and well written advise.

You mentioned that for a Broadband connection for 3 PC's, one needs a hub and a router. Since a router usually has 4 or more ethernet connections which can be directly connected to via CAT5 from each PC, why would a hub still be required?

I am in a similar situation as Andrew. Currently I have a 98SE PC connected to a D-Link 4 port router then to an ADSL modem. I plan to connect another PC (runs XP) to it as a network. After doing some readup's, I understand I can simply connect the XP PC to one of the remaining router ports. I believe because each PC goes through the router individually, I don't need to worry about doing any special setup on the XP PC, in order to work with the 98SE PC?

That why I though Huh? with your response. Please clarify/advise. Thanks.

- Collapse -
Router without a Hub
Aug 28, 2005 2:28PM PDT

Hello.
I have read your article and I have a desktop, a laptop, and a wireless router.
My desktop is connected to the router with a cable, and my laptop through a wireless card (USB).
Both of my computers share the same network IP address and the router DO NOT block data from one to another.
I wonder if I understood that you said that router dose not allow data from the same network to pass through him?!?

Thanks

Nir

- Collapse -
sry
Aug 29, 2005 8:50AM PDT

Many people on the forum have said the same thing. I might be wrong about this. Or maybe my knowledge is just outdated now.
There are many routers with built in switches. Wireless routers always have built in switches. When I wrote that sentence I was talking purely theoretically. If a device doesnt follow standards, or standards have changed, then my statement does not hold true.
Gary.

- Collapse -
I don't think you got it wrong or standards have changed.
Dec 2, 2005 5:08AM PST

I'm no expert, but I think the confusion here is one of nomenclature.

You said - roughly - that a router does not pass packets on to other computers in the same network and people have questioned this because the computers on their networks all connect through their "routers," which seems to contradict your explanation.

Perhaps what you said is still true of a pure router, but this says very little about the behavior of the boxes that most home users use and call "routers." For example, my home network is centered around a DLink DI-704P+ router/switch/wireless access point/print server. Because they're all in the same box, we tend to refer to these things by a single name, a "router." However, just because a packet goes through the box that I call a "router" does not mean that it goes through the true router component of it.

The way I believe it happens is that all packets exchanged within my home network pass through the switch that is attacted to my router (and contained within the box that I lovingly - if inaccurately - know as my "router), but never actually go through the router component within that box. I assume that the wireless access point is also connected to the switch and that communications with it also never pass through the router. Only packets that are addressed to the outside world of the internet pass through the router on their way to the DSL modem (which is also a router) and on to my ISP and its switches and routers.

Isn't that right?

- Collapse -
routers and switches and hubs connection ques
Aug 29, 2005 2:34AM PDT

I've read your response with interest. I now understand so much more than before. I have no background in computers but dive into things with lots of help from places like cNet and try to work them out. I have 6 home computers (in use by family members). We can see each other on the network, use the one printer I own and share a cable connection. I've set them up so that there is a router and a switch. The switch is connected to the router and 3 computers. The router holds the connection for the other three computers. Everything is working, but I see that you advocated a hub with the computers connected to that, so I wonder if I did something wrong.
Thanks, in advance, for taking the time to respond.
Jane

- Collapse -
um
Aug 29, 2005 8:48AM PDT

Naa if its working its all good. A lot of what I spoke is pure theory following international standards. In reality some routers/switches/hubs dont always follow standards exactly. If working on a corporate network you dont take chances but try to follow standard procedures. But if your home network works fine the way it does I wouldnt worry about it.
Also my information is a little outdated. There are routers than can handle the job of a switch as well. There are many routers with built in switches. You might have one of these. Or the network configuration worked out right anyhow.
Your network seems to be working perfectly, so lets leave it that way.
Gary

- Collapse -
Excellent Job!
Aug 29, 2005 3:00AM PDT

Gary,

I have been a Network Engineer for 7 years, and I have to say that reading your explanation on routers, switches and hubs was a great refresher course.

You did an awesome job explaing how they all work.

Regards,
Rhonda Nole

- Collapse -
thanks
Aug 29, 2005 8:42AM PDT

gee thanks. I havent worked on a network in 2 years. Recalling all that stuff was a refresher for me too.

- Collapse -
QOS
Aug 30, 2005 1:11PM PDT

Hey, so I was wondering if you can help me at all with understanding QOS in switches. I am the IT guy at a medium sized office (150 people, 60 PCs) and the network that had been built is basically just a few switches all connected to each other. Actually more like 15 different swithces. Anyway, we will soon be changing our phone system to use IP handsets, however they require QOS in the network. I am not sure what that looks like exactly. Any help you can offer would be great.
Cheers

- Collapse -
routers, firewalls, great explanation!!
Aug 31, 2005 5:50AM PDT

Gary: thanks for the excellent explanation of the basic concepts. I learned more from your posting than some textbooks I have looked at. It was never obvious to me that switches were only interested in MAC addresses, things are much clearer now. Wink BobB.

- Collapse -
routers
Sep 5, 2005 12:09AM PDT

I have additional questions please.

I work at home and have a safe "thin client" that is hooked to a wired modem. I also have HP notebook with wireless opportunities that I would like to expand on. SO my question is two fold:
1) Is it necessary to stay with the same brand?
2)Would it be a better investment to use the new "N"
series or would it be okay to use a "g"?
Thank you for the help.
Pat

- Collapse -
Answer by Pete Z.
Aug 24, 2005 8:49AM PDT

Andrew,

It's fairly simple, actually. You would need a bit of an understanding of how TCP/IP works to make sense of it. Everything done on the 'Net may seem like a seemless stream of information, but it's not. Everything is broken down into "packets" that are a fixed length and format. Each packet, like your standard postal letter has the source and destination routing, (the TO:
and FROM: on the envelope) as well as a fixed block of plain text.
Information that's larger than one packet is broken down into multiple packets. Even mulitmedia (audio, video, etc...) is first converted to text and broken down into packets. It's the responsibility of the recieving end to decode and reconvert the packets into audio/video. (This is why multimedia streams can sometimes be choppy. But I digress.)

Now then, we can look at each device, it's function and go forward from there. A car analogy works fairly well for how networking works. Consider each packet as a car travelling on a road.

A hub is a "dumb" device that allows multiple computers to communicate with each other. Think of it as an uncontrolled intersection on the highway - no stop signs or lights. As you can imagine, without any sort of control, crashes are bound to occur. And they do. Frequently.
Fortunately, no one, or nothing really gets hurt. The system that sent the original packet merely resends it (the car in our analogy) until it does manage to get through.

A switch is like a hub, except that it has traffic control built into it. It has the means to control which computer on the network talks to the
other(s) and when. Think of it as a traffic cop at the intersection and it's directing traffic. Since there are fewer crashes, throughput is a lot faster and more reliable.

A router is a device that sits between your DSL (or cable) modem and directs traffic. Think of it like the guy in an old fashioned mail room who sorts incoming mail into the appropriate cubby hole by looking at the address it's coming from and where it's going. Routers use something called Network Address Translation (NAT) to do this.

When you sign up for DSL (or Cable), you get one TCP/IP address allocated for your use. Each computer, however, needs an individual and unique IP address in order to get the appropriate packets directed to that machine. A router has the ability to create an independent set of IP addresses on the "inside" which then allow you to share one "outside" IP address with up to
255 different computers. (side note: The actual number of devices a router can handle may vary by manufacturer/model. See the documentation for more info on that.) NAT allows the router to flag each packet and keep track of where it came from and where the replies to those packets are supposed to go.

Making sense of it all...

Now then... Things get a bit tricky. There are "combo" devices available on the market. While they're all "routers" they also sometimes have a switch built in that allows you to save a power plug port - one fewer device to plug into the wall/surge protector strip. Most multi-port routers contain a switch, rather than a hub. As long as it's sorting the NAT data, it might as well manage the traffic on the ports.

And then there's wireless... The latest trend is to have WiFi access points built into routers. If you've got a laptop with a wireless radio built in, this may suit your taste. However, if you simply have three desktops to connect, it may be a solution worth looking into. These devices tend to, like their wired only bretheren, have NAT built in and can typically support up to 255 devices (check the documentation, your mileage may vary). Usually, wireless routers do offer at least one wired connection port for configuring and managing the router.

Wireless can be a good or bad thing depending on how it's configured. If you simply go for the default setup, you will probably be leaving your wireless access point wide open for ANYONE in your neighborhood within range with a wireless enabled laptop to hitch onto your network and potentially cause problems. You might not mind if your neighbor taps in and uses your DSL connection to say, download some songs or a movie until the MPAA or RIAA stormtroopers show up at your front door.

Wardriving...

Wardriving is an activity where a hacker drives around a given area looking for networks that are left wide open (hence the "driving" part). Once he finds a network that's wide open, he can do some pretty nasty things - like planting viruses on your computer, grabbing your personal financial data, sending out a flood of spam, etc... in addition to other nefarious activities.

On the bright side of wireless...

If properly configured (see the instructions for more details) wireless can be a good thing. You can connect anywhere as long as you're within range of the router/access point and you're not dragging a bunch of wires (except maybe the power brick) along for the ride. You have to configure each workstation correctly with the matching encryption code you created on the router/access point.

Firewalls...

Most all routers today come with firewalls built in as well as switches.
Most of them are adequate for keeping the bad guys out (for the moment, at least). As for needing a software firewall as well... That would depend largely on how paranoid you choose to be. It doesn't hurt to have one, but then again, it does take up resources which can slow your computer down. On the other hand, given the recent Cisco fiasco where a so called "security researcher" disclosed methods for attacking Cisco routers, it doesn't hurt to have a second line of defense.

So then, how do these devices get put together?

First, there's the phone jack at the wall. Next, there's the filter (supplied with your DSL installation kit). Then, you've got your DSL modem.
This would plug into the router's WAN port. You then simply plug your computers into the router's LAN ports. This is assuming you've got a router with multiple ports.

If you're going with a separate switch, everything is the same until you get to the router. You would plug the router's LAN port into any port on your switch and plug your computers into the switch.

The first option as mentioned above, requires one fewer plug on the surge protector and in all probability is cheaper. Wireless has it's place, but opens a kettle of fish best left covered for novice users. If you do decide to go wireless, best to read the instructions and follow them very carefully or have your friendly neighborhood computer geek give you a hand setting it up.

One other consideration for wireless... Most desktops do not come with wireless built in. You will need a wireless network card for each machine before you can connect to the access point/router. This, of course, raises the price significantly. CAT5 or CAT6 network cable is significantly cheaper.

CAT5 and CAT6

CAT5 and CAT6 are designations for network wiring. They generally come in fixed lengths from 3 feet to 50 feet. The numeric part of the designation (the 5 or 6) has to do with the quality of the wiring inside the cable and how much data it's rated to move. CAT5 is suited for 10/100 million bits per second (10-BaseT or 100-BaseT) networking which is typical for most home networking applications. CAT6 is a newer standard that's designed to handle gigabit networking (1000-BaseT) or 1000 million bits per second throughput.
While it's a nice thing to have, it's more bandwidth than most home networks need - even if you're sharing video over your home network. Given most DSL tops out at 1.5 million bits per second, and cable's best is about 3 million bits/second, a typical 10/100 network is more than adequate unless you're frequently copying HUGE files between your computers. And by HUGE - I mean ones that are a gigabyte or larger. A network that handles 100 MBits/second is plenty fast for most typical applications.

In conclusion, the simplest setup is generally the best. The fancier gear you add (while being ultra cool) generally means you will need to jump through more hoops to get it working. A regular wired multi-port router with say, 4 ports such as the Linksys BEFSR41 or the DLink DI-604 would be more than adequate for your immediate needs.

Submitted by: Pete Z.

- Collapse -
Some Gentle Coaxing to Pete
Aug 26, 2005 4:52AM PDT

Pete - Your information was very useful and lucid, but I want to encourage you to also consider yourself a writer. Please use a spell-checker (there were at least two mis-spellings), learn the difference between "its" [belongs to it] and "it's" [it is], and know the difference between "seamless" and "seemless" (yes, they sound identical, but their meanings are radically different).

Rich

- Collapse -
Yeah yeah.. I know..
Aug 26, 2005 3:56PM PDT

I've been wanting an online spell/grammer checker for the longest. Still waiting..

- Collapse -
Routers, Switches and Hubs
Dec 8, 2005 8:04AM PST

Congratulations! Peter, you should be a professor/teacher/coach or a saint (although you are still a bit too young for that).

Your simple diagramatic explanation of the functions of the various functions of the hardware and their interrelationship with each other is truly brilliant.

Even the "difficult" elements are clearly understandable. The only thing left to put your explanation into practice would, perhaps, be a question or two just to further clarify what you have already said.

Keep the answers coming, You have my vote!

"Zaide"

- Collapse -
Answer by Greg H.
Aug 24, 2005 8:49AM PDT

Routers, switches, and hubs, oh my!!! It's all so confusing, but let's try to break it down just a bit here.

First of all the basics of how networked computers communicate with each other. Now everyone please keep in mind I am trying to keep this simple and straightforward for everyone to understand so there won't be a lot of jargon throwing. When a group of computers are connected together you have a network. That network can be 2 computers in your home, 10 computers in a small office, 500 computers in a growing business, or millions of computers across the globe. Every one of those computers has to be uniquely identified between all the other computers it has the ability to talk to through it's network. This is handled by IP (Internet Protocol) Addresses, which are 4 groups of numbers between 0 and 255, for example on my local network my current IP address is 192.168.1.200, currently the address for Google.com is 216.239.39.99. Computers that are connected together in say your home or office would all exist on the same private network group. Basically all this means is that the first 3 groups of digits (192.168.1 on my PC) all be identical, and you change the last group (200) for each PC. So the PC next to me might be 192.168.1.123 but I would be able to directly communicate with that PC.

These numbers are all assigned to assist in "routing" traffic across your network. When you request something from another PC, your computer makes a connection over to the IP address of the desired machine and they start talking amongst themselves to resolve whatever it is you want. This routing also enables you to talk between networks (hence my requests to google.com get routed out of my network and over to the google.com server). This basic explanation was done to assist you in understanding the following:

Hub - is the most basic of connections possible between PC's. When traffic comes into the hub from any one PC connected to it, that same info gets sent out to ALL the other connected PC's and it is up to each of the computers to determine whether the traffic was meant for them or not. There is no filtering, or special handling of the data. Hubs are fairly old-school and cause a lot of unnecessary traffic across your network as well as lots of data "collisions" (traffic coming out of a PC while traffic is also trying to go in which can cause network slowdowns since the traffic is sent over again until it gets a response from each computer as to whether that traffic was intended for it or not).

Switch - also allows multiple computers to be connected (same as with a hub you can get switches with 4 connections all the way up to 24 (or more) in a single switch. The benefit of switches are that they isolate the flow of traffic. They have just enough intelligence built into them so that once it is determined which PC you are trying to connect to a direct connection is made between just those 2 computers, and data flow is greatly improved. None of the other PC's on the network are bothered by the traffic generated and they can all communicate on their own at the same time. Much better data flow and fewer "collisions" (see Hub).

Router - also controls traffic flow like a switch, however they have the added ability to be able to "talk" outside of their existing network (assuming a connection to outside networks (the internet) exists. A router will have a particular plug you would connect your broadband router into (either cable, DSL, or fiber optic).

When you have a connection to the internet the device connecting is assigned an IP address by your ISP (Internet Service Provider) and if your PC is connected directly to your modem, then it is your PC that gets that IP address. In order to connect more than 1 computer to your internet connection you need to be able to "share" that IP address across all your PC's. This is where the router comes into play. The router would then be assigned the IP address from your ISP, and in turn it assigns IP addresses to each of the computers on your network. So when you get on your computer and request a page from the internet, the router receives that request, and based on the IP addressing it determines that what you are looking for is outside of the local network. It then sends out a request on your behalf for that information, makes a note of which PC on the local network requested that information, and waits for a response. When the reply comes back in to the router, it looks into its notes to determine which local PC requested that information, and then forwards (or routes) it to you. So if you and the wife are each connecting to the internet and requesting different web pages, the router keeps track of who is asking for what, but all the websites either of you visit would think it was the same PC asking for the data because the IP address used on the internet side of things would be the same.

Most routers also have a built in firewall, but even if they don't they protect you greatly from outside sources since out on the internet side of things all anyone ever sees is your router and not your PC. So even in situations where you only have a single PC in your house, it would be in your best interests to install a router between your PC and your internet connection to minimize the ability of people getting in and seeing your data.

On a final note, the assigning of those IP addresses on your local network is usually handled by the router using a protocol called DHCP (Dynamic Host Configuration Protocol). This tends to be turned on by default in most routers (it can be switched off but I wouldn't recommend it) as you would then need to hand assign IP addresses in each PC on your network. Alternatively if you are connecting to a hub or switch you would also have to assign IP addresses as they don't handle any of that for you. Easier to just tell the computers to be assigned an IP address using a DHCP server and let the router handle it all for you.

Hope that helped explain it all, so the short answer is you want a router in order to properly share your DSL connection, and while you can install software firewalls in each of the PC's with a router in place you don't necessarily need that extra layer. Although some people feel better with it there, so it is a bit of a judgment call, if you have a lot of critical information you are completely paranoid about people seeing, then maybe you want a software firewall. For 75% of the home users out there, I would say it is just an additional layer of problems without much in the way of benefit.

Submitted by: Greg H.

- Collapse -
Routers are slow between computers on network
Aug 25, 2005 10:43PM PDT

I have two computers side by side with DSL modem and a router in place to network them together.XP-Pro-OS on both computers.
Why is it slower to send data,such as a large group of photos from one computer to another, thru the router on this network, when it seems so much faster if I just stay within one computer and send those pictures to an extra HD on that same computer(without going thru the router)?
I am using the latest cables for data transfer thru the router.

- Collapse -
Speeding up internal network
Aug 25, 2005 11:29PM PDT

You left out some of the important information. What speed are your router and ethernet cards in the computers? Most current routers and cards are 10/100 this is not particularily fast when you are sending large files from one system to another, the typical hard drive interface is at least 5 times faster. You can speed up the internal network considerably by using 10/1000 (gigabit) connections. For your internal network to reach 10/1000 All components will have to match, but slower connections can still be used for systems that don't need the speed.
You will need an autosensing Gigabit Switch, 10/1000 Ethernet Cards for the computers and Cat6e wires to connect them. You should connect the switch to your existing router and the computers to the switch. While prices are coming down, unless this is work related or a serious hobby you might find that this solution is a little expensive. Have Fun!