Date : Sun, 19 Jul 2009 10:36:30 +0100
From : pete@... (Pete Turnbull)
Subject: Master Ethernet upgrade
On 17/07/2009 21:34, Rick Murray wrote:
> Ah, you might be able to quickly clear up a question I've had for ages...
>
> Ethernet hub.
> Ethernet router.
>
> What's the difference? Both are boxes with a lot of RJ45s on to which
> you connect a bunch of computers...
What's often (imprecisely) called a hub is normally a repeater -- every
packet, data bit, and glitch (including collisions) that arrives on any
port is faithfully replicated and emitted from the others. The reason I
wrote "often" is that there are some "hubs" which do slightly more.
Dual-speed hubs, for example the 10/100Mb/s hubs that were common
several years ago, are actually two repeaters joined by a bridge. Hubs,
or repeaters, operate at the lowest layer of the network, the physical
layer, and you can think of them as little more than electrical
amplifiers. All the ports connected by a repeater are said to belong to
the same "collision domain" because everything -- including collisions
- on any port, gets to all the others.
The next step up the evolutionary network ladder is switches, which
operate at layer 2 (the lowest software layer, in a sense), and transmit
packets received on each port only to the other ports they think they
need to go to, after examining the MAC (for Ethernet etc) addresses in
the packets. If a switch doesn't know where to send a packet addressed
to a particular MAC address, it "floods" it to all ports. Switches
separate collision domains (because packets only go where they need to,
and collisions don't get forwarded) but they join ports together into
broadcast domains; that is, broadcast packets go to all ports.
Routers are one layer higher still. They operate at layer 3, and switch
packets from port to port according to the IP addresses (or the
protocol-dependant equivalent) in the packets. A router can separate
broadcast domains, by looking at the layer 3 data, and is often used to
link wider networks. In this case a broadcast packet is examined to see
which network it belongs to, and is only sent to the ports that belong
to that network. It's also the term used for something capable of
handling different layer 2 (link layer) protocols and therefore
converting between, say, TCP/IP over Ethernet, to PPP over ATM (which is
what a home broadband router does).
So your wireless broadband router with one ADSL port and four Ethernet
ports is a router because it connects two dissimilar networks (PPPoA and
TCP/IP over Ethernet) but also a switch because it switches TCP/IP
packets between the four Ethernet ports and the wireless AP.
--
Pete Peter Turnbull
Network Manager
University of York