1

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?

  • The switch learns the MAC address of every frame entering the switch. Each VLAN has its own MAC address table. – Ron Maupin Mar 23 at 23:23
  • @RonMaupin Does this mean that if we have different vlan configured on the switch port and different vlan on the ethernet port of an access point in my case that this is the reason for not learning? – Portwolf1982 Mar 23 at 23:33
  • A switch with two VLANs will have two MAC addresses tables, but every frame entering the switch will update one of the MAC address tables, but only the one that is for the VLAN of the interface where the frame entered the switch. – Ron Maupin Mar 23 at 23:35
1

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.

| improve this answer | |
  • Thank you for your thorough explanation. One last question. If for example a port of the switch is access port to X VLAN and the port of the AP is manually configured to use Y vlan will the port of the switch , will the switch learn MAC address of the AP on that port? – user2910800 Mar 24 at 17:28
  • No, the WAP is a bridge, and bridges do not normally generate frames with the bridge as the source address. That may happen if the bridge is managed and it is contacted via its management interface, the the switch could learn the MAC address of the bridge management interface. Standard bridging does not alter the source address on a frame, and bridges learn from the source address on the frame. – Ron Maupin Mar 24 at 17:32
  • To be more precise. Switch Port A vlan 301 (native vlan) and AP Port A( MGMT vlan 303). Would it be possible to learn MAC with that setup? – user2910800 Mar 24 at 17:38
  • Only if frames from the WAP management interface enter the switch. The WAP will not just send frames with its source address on its own, it will take someone connecting to the the WAP management interface from the switch side of the WAP. – Ron Maupin Mar 24 at 17:39
  • Thank you again for you time and precise answers – user2910800 Mar 24 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.