Switching Concepts in Networking

In this article I describe the basic switching concepts in networking for CCNA exam. Switching concepts in networking is relates to the Data Link Layer of OSI reference model. The whole function run in a local network there is no any layer 3 device available in the network like router. The switching concept in networking relates to the MAC address learning by the switches. The whole switch works in a single broadcast domain by default. Each port of switch have its own collision domain.

Remember HUB are working on physical layer of OSI reference model. All the ports of a HUB remains in a single collision domain. There was no any MAC address learning, filtering concepts in the scenario of HUB in a network. Similarly bridges used to provide communication between devices in a network. Bridges works similar to HUB. In this article I describe the full function of a layer 2 switch in a network in details.

Switching Concepts in networking working of layer 2 switch

Old bridges were used in networking before layer 2 switches. The bridges maintains content addressable memory filter table. This table was used to transmit the data to right receiver. Layer 2 switches maintain MAC address table for same purpose. Layer 2 switch provides a fast speed data transmission in a network because its each port breaks the large collision domain. Each port have its own collision domain.

Layer 2 switch forward frames from one device to another. A router decide to forward or drop the packet on the basis of PUD attached with packet. This PUD have the IP address of source and destination. Layer 2 switch forward the frame on the basis of MAC address header on the frame. Layer 2 switch add the MAC address of connected devices itself. This process is not done manually. The devices filter the frame encapsulation data and forward the frame to correct destination. This technology make data transfer faster in a network.

Functions of Layer 2 switching concepts in networking

The main functions of layer 2 switching are address learning, frame forwarding and loop avoidance. These three functions provides a fast and reliable data transfer in a network. Here we discuss in brief about these functions of layer 2 switching.

Physical address learning in the switching concepts in networking

In networking physical address means MAC address of a device. Layer 2 switch maintain a MAC address table of the devices connected with each switchport. This table contains the MAC address mapped with the IP addresses of all connected device with the switch. When a frame received at any port of switch then switch filter the MAC address from the frame according to the IP address or destination device. If filtered MAC address not saved in its MAC database then switch save the MAC address. This process done with each frame received by the switch.

You may also like to read --  Various cables used in networking

In brief, when a switch is powered on, its MAC address database is empty. Suppose 4 devices connected with that switch. Its MAC address database looks like below image.

the role and function of layer 2 and layer 3 switch, ccna, ccna tutorials, switching concepts in networking

Now let’s device A want to transmit data for device B. Frame encapsulates device A at layer 2. source address added to each frame transmitted via device A. Switch receive the frame at port F0/1.

As switch boot first time and have no MAC address database. Switch firstly save the mac address of device A from frame header. Now switch transmit the same frame to each device connected with it except to device A. Device B forward a acknowledgement frame to switch that the frame destination is device B.

On getting this acknowledgement switch store the MAC address of device B in its MAC address database table. Next time when device A or B send data to each other, switch forward the frame to correct address according to MAC address table. We can say now device A and B can communicate point to point with each other. Same process done till the MAC address of each connected device stored in its MAC address table.

So we understand that switches needs to keep an eye on all the MAC addresses of connected devices. Without learning function the switch can not maintain the data of connected devices and newly connected devices. The MAC address table updated regularly with new devices and old devices.

MAC Aging in the switching concepts in networking

MAC address learned by the switches and save in the MAC address table. It is possible that a device can be disconnect from a port and connected to any other port with the switch. In that case switch get same MAC address at two switchports. So the switch delete the MAC address related to a port older than 300 seconds. If a device imagine not connected to a switchport more than 300 seconds the MAC address of that device deleted from the MAC table. So the MAC address aging is 5 minutes only.

Forward and Filter Decisions in the switching concepts in networking

We know how a layer 2 switch create and maintains it’s hardware address table. Forward and filter decisions at layer 2 switching depends on MAC database table. When a frame received at its interface. Switch look after the destination MAC address in frame’ header. On finding the destination hardware address it choose the interface to exit the frame. Each frame treat according to this process and forwarded to correct device.

You may also like to read --  The Role and function of Router in internetworking

On receiving a frame switch forward it to correct exit interface. The frame does’t sent to any other interface except it’s correct destination. This process known as frame filtering. If the MAC address not found in MAC database then switch flood the frame to each port except the interface of frame source.

Suppose computer A and computer B are both identified by their port numbers, the switch can do what switches do. Computer A can now continue its conversation with computer B. When the switch receives the frame it first looks up the destination address in the MAC Address Table. It then forwards the frame to that related port. Suppose computer A connected to Port 10 and computer B connected to Port 20. When the switch receives the frame at port 10 for computer B, it immediately forwards that frame to Port 20. This process is known as forwarding of packet in networking.

Flooding in the switching concepts in networking

Flooding means a packet forwarded and received in the network from various ports again and again. Suppose there are multiple switch working in a network, it is possible the frame can be forward from one switch to all switches and a flood of frames occurs in the network. It is generally known as loop in the network. For example in the case of broadcasting the DHCP all switch broadcast the DHCP packets again and again in the network. This cause a flood of DHCP packets in the network.

Another reason of flooding is when a switch received a frame and the destination MAC address is not in its MAC Table than the switch forward this packet to other switches. This process run again and again till the frame reaches to the destination. This type of frame also spread the flood in the network. Due to flood in the network a loop occurs now we need some mechanism to avoid these loops.

Loop Avoidance function in the switching concepts in networking

When multiple switches connected in different segments then chances of Loop occurs in a network. Loop avoidance is important for better performance of the network. Spanning Tree Protocol is use to prevent the network loops. In large networks redundant links used between switches to avoid communication failure.

You may also like to read --  Concept of switching in networking

Redundant links meaning if a link failed due to any reason next link will active automatically. Chances of communication failure are less. Some time the redundant links creates network loop. This is because frames can be transmit to all redundant links and creating loops. As shown in figure below.

switching concepts in networking, ccna, ccna tutorials

A host receive multiple copies of the same frame from different segments. Switch will not filter the frame because frame received from multiple interface on switch. Switch will save the mac address of multiple frame and fail to forward the frame. This is known as thrashing the MAC table. This will creates a big flood of unnecessary data in the network.

Poor performance slow speed will occur. One remedy to avoid loop back is to reboot the switches of any one segment. But in a large network rebooting of switch is a big deal. To avoid these problems STP Spanning Tree Protocol used. You can read all about the Spanning Tree Protocol here.

Unicast frames in the switching concepts in networking

Unicast frames are very common frames forwarding in networking. The Unicast frames use to identify which MAC address is connect with which port. Similarly some frames belongs to particular service are sent to unicast message. The unicast frames are of two types known and unknown. Both are sent accordingly to the MAC table of switch.

Multicast and broadcast frames in the switching concepts in networking

Some frames are transmit for multiple clients or for all clients. These are known as multicast and broadcast frames. These multicast and broadcast addresses are the big cause of flood in a network. Since there is no any fix destination address attach on the frame the switch can not save the MAC address of the destination devices.

In this article I describe the switching concepts in networking for CCNA Exam. I hope you found this article helpful. For any query or suggestion on this topic you may drop a comment below or contact us. Your suggestions are always welcome by us.

Share this article in your social circle :)
,

2 thoughts on “Switching Concepts in Networking

  1. It’s in point of fact a nice and useful piece of information. I
    am glad that you simply shared this helpful info with us. Please stay us up to date like
    this. Thank you for sharing.

    my web blog: cbd gummies

Leave a Reply

Your email address will not be published. Required fields are marked *