What's the difference between a hub and a router?

sxftdeep

Senior member
Feb 2, 2004
255
0
0
I need to know what the difference between a hub and a firewall is because I'm thinking about setting up a (wired) home network. In what situation would you use a hub, and in which situation would you usea router? What are the pros/cons of each? Thanks.
 

Mullzy

Senior member
Jan 2, 2002
352
0
0
A HUB will let you run mutliple devices straight out of your Cable/ADSL modem (to a maximum of how many IP's your provider will give you).

You don't get any security, just the ability to get more PC's real world IP's. I know nothing of routers/firewalls other than that they must be better than using a HUB.
 

Lonyo

Lifer
Aug 10, 2002
21,938
6
81
A router will allow you to connect a variety of computers (depending on number of ports) and they will all be on a LAN together.
You can get one also witha built in modem, which will mean that any computer can access the internet through the router. They also usually have firewalls built in, and filters (depends on which one you get).
I have a 4 port + wireless router, and I have 2 computers connected wirelessly and 2 wired, and they all work on the same LAN.

Haven't teally tried the BB, because it doesn't truely work.
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
A router will allow you to split an IP to each device hooked up to your router.

With a hub, each device connected will need it's own IP. Most likely you only have one IP and your ISP will make you pay more for each IP.

Routers also have built in switches and some have built-in print servers which is a very nifty feature.
 

wkwong

Banned
May 10, 2004
280
0
0
a router actually has built in ability to assign ip addresses and connect directly with ur service provider. a router is kind of like a small computer dedicated to your connection and routing service to all the computers or any hubs hooked up to it.

if u only had a hub, you would need a computer to be the router part of it and assign ip's and hold the connection for the network.
 

Markfw

Moderator Emeritus, Elite Member
May 16, 2002
27,033
15,983
136
Most (if not all) routers have a switch, which is a "smart hub" and more efficient than a hub. In addition to that, the other part is the DHCP server, which it the part that assigns the IP addresses, and the router also has a place to filter requests, to become partly a firewall.
 

Mday

Lifer
Oct 14, 1999
18,647
1
81
router: assigns IP, also takes an IP
hub: allows computers to communicate with each other across a network with no fancy features
switch: allows computers to communicate with each other across a network with built in implementations to increase efficiency

I will not address how each does their thing. the items above are not mutually exclusive. a router must have switching capabilities. a switch is a hub, but a hub is not a switch.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: Mday
router: assigns IP, also takes an IP
hub: allows computers to communicate with each other across a network with no fancy features
switch: allows computers to communicate with each other across a network with built in implementations to increase efficiency

I will not address how each does their thing. the items above are not mutually exclusive. a router must have switching capabilities. a switch is a hub, but a hub is not a switch.

Uh, more or less correct.

A hub connects multiple computers together so they can talk to each other, but does so without any intelligence. You are limited to half-duplex connections with a hub, and there is no protection against packet collision (both of which can severely degrade performance if several busy systems are attached and working simultaneously).

A switch is a 'smart' hub, which provides each computer attached to it with its own private full-duplex connection. This eliminates packet collisions, and means that two computers connected to the switch and talking to each other won't interfere with, say, another computer connected to the switch but talking to a system out on the Internet.

A router is a switch that includes packet routing capabilities (it's feasable to have a router built on top of a hub, but any router you'll buy today is switched). This means that when packets come in from an outside network, instead of just sending them to all the attached hosts, the router is smart enough to only send them where they need to go. This also applies the other way (if you have multiple uplinks); if multiple routers are connected together, they will send your packets to the right place without spamming them all over your network. Routers are assigned an IP address (usually via DHCP, though they can be manually configured) just like any other system attached to a network, unlike a switch or hub. Most consumer routers also include NAT (Network Address Translation), which allows the router to take a single IP address (from your ISP) and attach a virtually unlimited number of systems to it by providing them with dummy addresses and doing on-the-fly packet manipulation to make external hosts think they are talking to the router when in fact the traffic is being passed through to an internal host. This is usually combined with a firewall to provide a high level of network security, as NAT makes it impossible for an external host to establish a connection with an internal host (since the internal host has no specific external IP address assigned to it).
 

duragezic

Lifer
Oct 11, 1999
11,234
4
81
What is half-duplex connections?

At home we have two computers connected with an old, cheap hub. I would've thought we only got one IP though...? THe speed is fine normally except last night for some reason I was getting a crap connection... was the other computer causing this?
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: eagle
What is half-duplex connections?

In a half-duplex connection, the computer can only 'send' or 'receive'; it cannot do both simultaneously (think walkie-talkies; when you hold down the 'talk' button, you can't hear what the other person is saying). In a full-duplex connection, the computer can send and receive data at the full rate at the same time. Switches provide independent full-duplex connections for each host that is attached. If you are using a hub (half-duplex), you can get packet collisions if two computers try to send simultaneously (including any systems you are connected to on the net!), which will cause performance to go WAY down. You may want to note that *all* wireless connections are inherently half-duplex and suffer from this limitation, which is why putting several 802.11b devices in the same area makes all of their connections suck.

At home we have two computers connected with an old, cheap hub. I would've thought we only got one IP though...? THe speed is fine normally except last night for some reason I was getting a crap connection... was the other computer causing this?

As far as your setup, your ISP may have configured things to simply hand out multiple IP addresses per cable/DSL modem. Most set it so that you can only have 1 address per modem unless you pay extra, though. If you're using a hub, and were running a bandwidth-hungry program on one computer (like a filesharing app, or just downloading a large file), your other computer's connection would likely see some impact. But it could also have been a problem on the ISP's end.