Difference between a Router, Switch, and Hub?

Sp0rkz71

Reputable
Jun 16, 2015
3
0
4,510
Hi everyone! I've been looking at differences between Routers, Switches and Hub but all the explanations have been mind boggling to me, if any can please explain it to me in a simple way I would really appreciate it! :)
 
Solution
Hubs are ancient. Anything that goes in one wire will come out every other. Typically not found above 10Mb/s.

An ethernet switch is sort of like a switch, but knows which wire to put the signal out. A switch is part of a Local Area Network. DHCP (which gives out IP addresses) can pass through a switch. Use a switch if you want to add more devices to an existing network.

A router goes between ethernet networks. These divide local area networks from external networks or other local area networks. A DHCP server will need to be on each side of the router (most consumer routers include a DHCP server on the internal side; your ISP usually runs a DHCP server on their side) if you want everything to get IP addresses automatically.
Hubs are ancient. Anything that goes in one wire will come out every other. Typically not found above 10Mb/s.

An ethernet switch is sort of like a switch, but knows which wire to put the signal out. A switch is part of a Local Area Network. DHCP (which gives out IP addresses) can pass through a switch. Use a switch if you want to add more devices to an existing network.

A router goes between ethernet networks. These divide local area networks from external networks or other local area networks. A DHCP server will need to be on each side of the router (most consumer routers include a DHCP server on the internal side; your ISP usually runs a DHCP server on their side) if you want everything to get IP addresses automatically.
 
Solution

mrmike_49

Distinguished
Feb 2, 2010
709
0
19,060
1st you need a router to manage the network and assign the ip addresses to any device on the hetwrok (pc, phone, printer, etc). If you run out of cable spots (typical routers have 4 connections) you can then add a switch to connect more ethernet cables. Note that a Wireless Router is all you need if all of your devices are connected wirelessly, with maybe 4 connected by ethernet cable
 
1st you need a router to manage the network and assign the ip addresses to any device on the hetwrok (pc, phone, printer, etc).
You don't technically need that. DHCP servers can be entirely separate, and often are on large networks. Or you can statically assign them, but that's a bit of a pain.

'Managing' the network is utter rubbish. Networks are decentralised, pretty much by definition. You can even have multiple routers on one network, provided only one device serves up DHCP. Just need to set the gateways correctly.
 

Kewlx25

Distinguished
Hubs are old dumb devices that didn't regenerate signals in most cases. You could literally make a hub by crimping a bunch of network cables together if you did it correctly.

Switches learn MAC addresses and forward packets to the receiver. When the sender doesn't know the MAC address for an IP, the sender broadcasts the packet, which means the packet gets sent to the entire broadcast domain, aka all of the switches connected together. Then the receiver responds back, but this time with its MAC address. Since we knew the sender's MAC address and the receiver responded back with its MAC address, both MAC addresses are now known. All packets from here on out will be sent directly to the port of those two MAC addresses.

Routers route packets between networks and potentially over many different paths. Switches, for the most part, can't handle multiple paths. Remember how I said when a sender does not know the MAC address of the destination IP, so it broadcasts the packet. These broadcasts would quickly destroy a large network because a broadcast packet gets sent to the entire network instead of only the destination. Routers know where to send packets so they don't broadcast packets. routers break up these broadcast domains and can handle custom routes.
 

BuddhaSkoota

Admirable


One of the easiest explanations I've come across (and one I like to use):

Switches (and hubs) create networks (e.g. computers within a home/office).

Routers connect networks (e.g. a home/office to the Internet).
 


As good as it gets for the home user.


Use simple Newtonian physics to explain earthly bound issues, is only when leaving earth does one need higher Einsteinian Physics. :)