Difference between a network hub and a switch?

Jeff Silverman jeffs at kant.ee.washington.edu
Tue Jul 25 10:55:03 PDT 2000


Nathan Flint wrote:

> Does a switch route based on the MAC address or tcp/ip? Is that ARP?
>
> -nate

An excellent question.

"It depends".  A "level 3" switch makes its decisions based on the IP address, and it doesn't deal with Ethernet MAC
addresses.  A "Level 2" switch, which is more common, deals with ethernet MAC addresses and doesn't pay attention to
protocol.  Some switches work at both levels, depending on protocol.  BTW, the levels refer to the OSI network model.
http://www.uwsg.indiana.edu/usail/network/nfs/network_layers.html has a nice comparison of the OSI and TCP/IP network models.

The next question, then, ought to be what is the difference between a switch and a router?  A switch is transparent to
TCP/IP, even a level 3 switch.  But a router is not transparent to TCP/IP: you have to know about it either using one of the
gateway protocols or dynamic routing protocols or have a static route.


Jeff


>
>
> Jeff Silverman wrote:
>
> > "F. Pascual" wrote:
> >
> > > What is the difference between a hub and a switch, or are they the same thing?  When would you use one over the other?
> > >
> > > Get your FREE Email and Voicemail at Lycos Communications - http://comm.lycos.com
> >
> > A hub and a switch are similar but different.   Both are generally used with UTP Ethernets, although devices for
> > connecting together multiple thinwire ethernets are also called "hubs".  In a "normal" ethernet, every packet sent goes
> > to every station on the Ethernet.  A hub does the same thing.  But a switch is smart - it remembers what ethernet
> > addresses are on which lines and it only sends packets to those lines that need to see them.  A switch also has to
> > understand about multicasts and broadcasts.
> >
> > The advantage of a switch over a hub is that it is possible for several stations to talk on the wire simultaneously.
> > Their packets are buffered in the switch.  This is good for ethernets with heavy traffic.  For ethernets with light
> > traffic, the buffering represents extra time  and actually slows things down.
> >
> > Hubs generally cost less than switches.
> >
> > --
> > Jeff Silverman, sysadmin for the Research Computing Systems (RCS)
> > University of Washington, School of Engineering, Electrical Engineering Dept.
> > Box 352500, Seattle, WA, 98125-2500 FAX: (206) 221-5264 Phone (206) 543-9378
> > jeffs at rcs.ee.washington.edu     http://truk.ee.washington.edu/~jeffs

--
Jeff Silverman, sysadmin for the Research Computing Systems (RCS)
University of Washington, School of Engineering, Electrical Engineering Dept.
Box 352500, Seattle, WA, 98125-2500 FAX: (206) 221-5264 Phone (206) 543-9378
jeffs at rcs.ee.washington.edu     http://truk.ee.washington.edu/~jeffs





More information about the Linux mailing list