MAC address table populated using source address field

The MAC address table is populated using the source MAC address found within the header of the Ethernet frame. This means that two switches that are directly connected may not be populated with the MAC addresses that correspond to the switchports through which they are connected.

Refer to the following network topology:

two-switches-four-hosts.png

SW1 will populate its MAC address table by looking at the source address of incoming frames. When H3 communicates with H1, the frames received on Gi0/3 of SW1 are frames that were generated by H3, and they have H3's MAC address in the source address field. When they pass through SW2, they are considered transient traffic and SW2 simply forwards those frames to SW1. Thus, SW1 will not be populated with the MAC address that corresponds to any of the ports of SW2.

The only way that SW1 will populate its MAC address table with the MAC address of SW2 will be if SW2 generates traffic itself (like a ping for example) and sends it either to SW1 or via SW1.

https://networklessons.com/switching/how-does-a-switch-learn-mac-addresses

Links to this page: