Re: hubs and switches
Andrew Perrin, 2002-Jun-13 09:23 -0400:
> Well, saying "a router is basically a hub or a switch on steroids" is
> somewhat akin to saying a car is basically a child's wagon on steroids; it
> misses the central point of a router. Yes, a router will (often) have
> several network ports built in (although technically I think that's just a
> router and a hub in the same box); but what makes it a router is the
> ability to program it to read packets and send them in the right direction
> -- something neither hubs nor switches can do.
>
> Furthermore, there's no requirement that a router have multiple (e.g.,
> >2) network ports; to be a router it only needs to have one network
> connection per network being routed (generally, for home use, one for your
> DSL or cable modem and the other for your private network).
>
> You're right that you don't need a separate router if you've got a machine
> masquerading. Essentially what's happening is the masquerading machine is
> acting as a router. There's no conceptual difference between a router and
> a computer with two (or more) network cards, each plugged into a different
> network; a dedicated router is cheaper and more secure than a computer
> doing the job, but technologically speaking it's essentially the same
> thing.
While we're at it, a couple more points of note regarding hub
vs. switch vs. router:
- a hub will repeat every packet it recieves on any port to every
other port...every port is sharing the bandwidth on the backplane
and only one port can transmit at a time. so, you need to watch out
for collisions since all the ports are in the same collision
domain. when i say every packet, that means unicast, broadcast and
multicast.
- a switch forwards each packet it recieves directly to the
destination port. it maintains a table of all the learn MAC
addresses for each port so it know where to send packets. a switch
can transmit multiple packets at the same time until 2 packets need
to go to the same port, then it acts like a hub and only one packet
goes at a time. collision domains are reduced, contained to each
port, thus more bandwidth is available. a switch is a multiport
bridge, is essence. it also forward all unicast, broadcast and
multicast traffic.
- a router contains each collision domain, broadcast domain, and
multicast domain to each port. I will only forward a packet if it
know where it needs to go. a router will not forward broadcast
packets and it will only forward multicast packets if it's
configured to do so (IGMP, MOSPF, DVMRP). router can bridge if you
tell it to, but mostly they are used to handle layer 3 protocols
like IP. routers are mostly software, so you can get them to do
many things, such as packet filtering and traffic shaping, not just
spanning subnetworks.
I just wanted to add a bit more to make the difference more clear.
There is definitely a place to use each device. I hope this helps
someone.
jc
--
Jeff Coppock Systems Engineer
Diggin' Debian Admin and User
--
To UNSUBSCRIBE, email to debian-laptop-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: