How Switches Forward Frames Explained

An Ethernet switch is a centralized networking device. It works in the middle of the network. It connects end devices to the network. End devices use frames to communicate. A frame is a small unit of data that two end devices exchange. It includes the source address, destination address, protocol-specific information, and data.

A switch has many ports. It forwards an incoming frame only from the port connected to the destination device of the frame. You can divide this process into three phases: learning, decision-making, and forwarding. This tutorial explains the decision-making phase.

The following tutorial explains the learning and forwarding phases.

A switch saves the MAC addresses of all connected devices into a table known as the CAM table. When it receives a frame, it reads the source and destination MAC addresses. It uses the source address to learn about the connected device. It uses the destination address to make forwarding decisions for devices.

A switch uses a relatively simple concept to forward a frame. It finds the destination MAC address of the incoming frame in the CAM table. If the CAM table has an entry for the destination MAC address, it forwards the frame from the port mentioned in the entry. If the CAM table does not have an entry for the destination MAC address, it forwards the frame from all ports except the port on which it arrived.

The process of forwarding a frame from all ports except the port on which it arrived is called frame flooding. A switch floods a frame if the destination address field contains an unknown unicast, multicast, or broadcast address. An unknown unicast address is one that is not present in the CAM table.

A multicast address belongs to a group of devices. A broadcast address is used by all devices on the local network. Multicast and broadcast are destination-only addresses. These addresses are never used in the source address field of a frame. Since these addresses are never used in the source address field of a frame, and a switch uses the frame's source field to learn addresses, a switch never learns about these addresses. These addresses always remain unknown to the switch.

Since a switch always floods a frame with an unknown destination address, a frame with an unknown unicast, multicast, or broadcast destination address is always flooded by the switch.

Let's take an example.

PC-1 sends a unicast frame to PC-3. The frame reaches the switch on port 1.

decision making example

The switch reads the destination address field of the frame to make a forwarding decision. A switch reads the frame's destination address before the source address. It first makes a forwarding decision based on the destination address and then updates the CAM table based on the source address. This frame has PC3's MAC address in the destination address field. Since PC3's MAC address is not present in the CAM table, the switch floods the frame.

frame flooding

After making the forwarding decision, the switch uses the frame's source address to update the CAM table. Since this address is already available in the CAM table, it updates the connected port field and resets the aging timer. The frame reaches PC3. PC3 replies with its frame. The frame reaches S1 on port 3.

The switch reads the frame's destination address and finds it in the CAM table to make a forwarding decision. The frame has PC1's MAC address in the destination address field. This address is available in the CAM table. The switch decides to forward the frame from port 1.

frame forwarding

After making the forwarding decision, the switch reads the source address field to update the CAM table. The source address field contains PC3's MAC address. This address is not available in the CAM table. The switch adds a new entry to the table. The switch forwards the frame from port 1. The frame reaches PC1.

Conclusion

An Ethernet switch efficiently manages data traffic within a network by learning device MAC addresses, making forwarding decisions based on its CAM table, and flooding frames when the destination is unknown. This systematic process ensures that data reaches the correct devices while minimizing unnecessary network traffic.

ComputerNetworkingNotes CCNA Study Guide How Switches Forward Frames Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com