Saturday, 13 January 2024

How does a switch learn MAC Addresses

 A switch has some intelligence and operates on layer 2 of the OSI model. In this lesson, I’ll demonstrate how a switch learns MAC addresses. Let me show you an example of three computers connected to a switch:

three computers connected to switch

There’s a switch in the middle and we have 3 computers. All computers have a MAC address but I’ve simplified them. Our switch has a MAC address table and it will learn where all the MAC addresses are in the network. Let’s send something from H1 to H2:




switch incoming frame

H1 is going to send some data meant for H2, thus it will create an Ethernet frame which has a source MAC address (AAA) and a destination MAC address (BBB). Our switch has a MAC address table and here’s what will happen:

switch learns mac address

No comments:

Post a Comment