Learning MAC Addresses

In this article we will discuss Switch Fundamentals, will make brief discussion on Switch Fundamentals, In last article we discuss about Switch Fundamentals.

The switch dynamically builds the MAC address table by examining the source MAC address of the frames received on a port. The switch forwards frames by searching for a match between the destination MAC address in the frame and an entry in the MAC address table.

The following process is performed on every Ethernet frame that enters a switch.

Learn – Examining the Source MAC Address

Every frame that enters a switch is checked for new information to learn. It does this by examining the frame’s source MAC address and port number where the frame entered the switch.

  • If the source MAC address does not exist, it is added to the table along with the incoming port number. In Figure 1, PC-A is sending an Ethernet frame to PC-D. The switch adds the MAC address for PC-A to the table.
  • If the source MAC address does exist, the switch updates the refresh timer for that entry. By default, most Ethernet switches keep an entry in the table for 5 minutes.

Note: If the source MAC address does exist in the table but on a different port, the switch treats this as a new entry. The entry is replaced using the same MAC address but with the more current port number.

Forward – Examining the Destination MAC Address

Next, if the destination MAC address is a unicast address, the switch will look for a match between the destination MAC address of the frame and an entry in its MAC address table.

  • If the destination MAC address is in the table, it will forward the frame out the specified port.
  • If the destination MAC address is not in the table, the switch will forward the frame out all ports except the incoming port. This is known as an unknown unicast. As shown in Figure 2, the switch does not have the destination MAC address in its table for PC-D, so it sends the frame out all ports except port 1.

If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports except the incoming port.

Add a Comment

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