Tuesday 10 November 2015

Switches - Layer 2 Devices


A network switch or a MAC bridge is a computer networking device that connects devices together on a computer network. Unlike less advanced network hubs, a network switch has the ability to forward data only to the one or multiple devices that need to receive it, rather than broadcasting the same data out of each of its ports.

There are three main types of switches:

  • Store and forward switch
  • Cut through switch
  • Adaptive switch

Store and forward:
A store and forward switch accepts the input data and then buffers or stores it briefly. It then checks the checksum to verify data and then it outputs the framed data to a specific interface or port. This method of switch is very error resistant but can be quit slow by comparison.

Cut through switch:

A cut through switch is a little bit more intelligent as it recognises that the destination address will always be at the start of the frame of data. This allows a cut through switch to to begin forwarding incoming frame onto the output port as soon as the destination address is recognised. This greatly improves the speed at which the switch processes data however it also may propagate some bad frames or errors.

Adaptive switch:
An adaptive layer 2 switch basically combines the functionalities of a store and forward switch and a cut through switch. An adaptive switch will normally operate in cut through mode however if a particular port's error rate becomes to high, the switch will automatically reconfigure the port to run in store and forward mode. This adaptive switching is usually done on a port by port basis.


Switches are commonly used to connect devices within a LAN  which we discussed in a an earlier post(small geographical area, limited number of nodes). It is because of this limitation on the scope of a network connected to a switch which allows the switch itself to learn and store information about the network that it connects. 
When a switch receives a frame of data it learns the location of the sender and stores or records this location in a switch table sometimes called a MAC Table. Then if the frame destination is unknown it floods the network. During this flooding the switch learns addresses by examining the source mac address of each frame received, then it updates the MAC table as necessary. 



Then if the frame destination of a particular frame of data is known it simply sends it directly to the destination MAC address.

Switches can be interconnected in a hierarchy to accommodate bigger networks of interfaces.
In a hierarchy the switches work exactly the same with the same self learning capabilities.







1 comment:

  1. This article was a real eye-opener about the build quality of these switches WS-C2960X-48FPD-L effortlessly. Experience style, quality, and convenience.. I had no idea they were so modular inside. It got me thinking, what are some common issues that people face with ProCurve 2824 switches, and how can they troubleshoot or repair them?

    ReplyDelete