Switching – Why a Switch Doesn’t Learn MAC of a Connected Device

networkingswitchswitchingvlan

I am new to networks. What does it mean when a switch doesn't learn the MAC address of the connected device? And how can VLANs can impact that?

Best Answer

A switch has a MAC address table for each VLAN, and the switch will populate the MAC address table of the VLAN with the source MAC address of any frame entering the switch on an interface in that VLAN.

You did not specify the switch model, so we cannot tell you specifically how to see the MAC address table. On a Cisco switch, the show mac-address-table command will show all the entries for all the MAC address tables, but other vendors may do it differently.

Also, MAC address table entries will time out, so if the switch has not seen any frames from a particular host in a while, the MAC address table entry for that host will time out of the table.

In your comment, you explain that you have another bridge (switches and WAPs are bridges). If a host on your WAP sends frames to another host on the WAP, the switch will not see those frames, so it will not have an entry in its MAC address table for those hosts. It is only when a host on the WAP sends a frame that enters the switch that the switch will create an entry for the MAC address of the host. The switch interface for the WAP could have multiple MAC addresses associated with it in the switch MAC address table if multiple hosts on the WAP send frames into the switch, but the key is that the switch must see at least one frame for a host enter the switch during its timeout period for you to see the MAC address in its MAC address table.

The bridges will not normally have MAC address table entries for other bridges because the bridges do not originate traffic, so the frames will not have the source MAC address associated with the bridge. Bridges normally forward frames transparently. A WAP must translate the Wi-Fi frames into ethernet frames, and vice versa, but it preserves the original host source and destination MAC addresses of the original frames on the translated frames.