Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

MAC address learning


I just want to ask that whether port learns a mac address or whole switch?

shortly, port has a mac address or a switch?

Community Member

MAC address learning

can anyone pls answer on this?

Community Member

MAC address learning

HI Vishal,

The switch learns the mac address on per port basis.

Quickly put the switch keeps all that information in its CAM table which keeps track of which mac address it learned and on which port it has seen this mac address.

You can view the content of the CAM table by using the command

show mac-address-table


show mac address-table

(Depending on the platform and IOS you're using)

Jonathan S

Cisco Employee

MAC address learning

Adding to that you also can consider different platforms - single rack ones and bigger chassis with line cards. In both cases MAC learnt on a particular forwarding engine though mechanisms can be different.

Answering to your specific question "shortly, port has a mac address or a switch? " - mac is learnt when packet already received by port and the forwarding decesion is taken by particular engine. If forwarding decision taken by Line card then MAC is first learnt by that LC forwarding engine and stored in it's memory and further synched with all the other Line Cards and main CPU on platform. If it 1RU switch, then MAC learnt again during the forwarding decision by ASIC controlling that function.

So port itself can't learn as it can't inspect the packet - it is forwarding ASIC which is considering how the packet should be forwarded look at the MAC and stores that within appropriate table.

So yes it is done on port bases - but done by Forwarding Engine.

Hope this clarifies the things to you.


CreatePlease to create content