Hubs and Switches

 

Introduction.  As mentioned previously, hubs and switches function as layer 2 devices in the OSI reference model.  The are the building blocks with which LANs and LAN segments are put together.  This page is about their commonalities and differences.  Then there are subsequent pages that focus on each type of device.

Both hubs and switches have connection ports, operate in LAN domains and they provide connectivity both internally and to network backbones.

The following diagram represents a basic star topology.

 

 

Here, the hub or switch is acting as a focal point to distribute frames within the LAN.  How this is specifically done also depends on other things about the LAN such as whether it is running some variant of Ethernet or maybe Token Ring.

It is important to remember that a router uses the IP address to get you to a particular local network neighborhood, but the MAC address identifies the actual NIC connecting its device to the LAN.  So again, routers work at level 3 between LANs, switches and hubs move frames/messages at level 2 within LANs and LAN segments.

Typically a switch, hub or cable is used to define a LAN segment, a switch is used to determine a LAN containing these segments as shown in the following diagram for a star hierarchy.

 

 

This sort of network segmentation, even on a local level, has proven to be beneficial for a number of reasons.  Three major reasons network segmentation is being used more and more are
  • it improves network performance by isolating traffic
    • it is often the case that users within a workgroup or department interact with each other more than with those outside, so putting them on their own LAN segment means their traffic doesn't have to be merged with others
  • reliability of the overall network is improved because what happens on one segment is much less likely to impact what is happening on other segments
  • the modularity can be developed to improve security and manageability because devices can be grouped in ways to make them more secure and manageable

Some Important Distinctions.  The essential distinction between hubs and switches is that switches can create a private connection between devices on a network.  When devices connected by a hub attempt to communicate they contend for the bandwidth of the shared medium of the LAN.  If they are locally connected through a switch the devices are given full use of the connection mediums bandwidth for the split second it takes to complete the transmission.  In other words, hubs are indiscriminate repeaters and switches target ports to complete circuits.  Switches require more sophisticated hardware and software to work.

Unfortunately, as you'd expect, hubs are generally much less expensive than switches.  But the general trend in designs is to be replacing hubs with switches whenever reasonable.  More will be said about this in later pages.