switch mac address learning and clearing

Unanswered Question
Apr 7th, 2008

Hi all, Can anyon tell me the process of when say I plug a pc in one switch, and then if I unplugged it from one switch, then plugged it into another switch, how does it make sure the mac address is cleared from one port ans then added to another, is it via tcn's telling switches to flush mac tables ?

please help

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
mahmoodmkl Mon, 04/07/2008 - 02:47


It depends upon the aging timer.if the switch doesnt hear from a mac-address for a particular time period it will age it out.i think its generally 5 min.



carl_townshend Mon, 04/07/2008 - 03:34

and what happens if I move my pc, how is this change notified to other switches, we dont have to wait 5 mins for the age do we, is there a trigger ? tcn ? to change age to 15 secs or something ?

ciscograyaw Wed, 04/09/2008 - 12:01

The trigger is any new traffic coming from your relocated PC will overwrite older, incorrect entries on switches it passes through. Keep in mind a PC on connection will also generally do things like broadcast a DHCP request (or Windows spams looking for DCs, etc.) which will be seen by all switches in the broadcast domain, and their CAM tables will be updated.

carl_townshend Thu, 04/10/2008 - 00:24

can you please tell me the process of this please?

also am i right in saying spanning tree tcn,s trigger the aging timers to age out any entries older than so many secs on switches which would also clear it

ciscograyaw Thu, 04/10/2008 - 13:51

Second question first: Spanning tree generated TCNs will indeed essentially zero out the aging timers on the CAM tables and require them to be repopulated. This is (part of) the reason spanning tree respans are bad, network perfomance wise. Depending on device, software running, and configuration mode, after the TCN clear it may re-ARP out all interfaces and repopulate its CAM table that way.

First question: Each packet that a switch receives it looks at the Ethernet header. It already knows which port it came in, and the Ethernet header contains the source MAC address. It will take that information (the source MAC and port pair) and put it into it's CAM table, overwriting anything that may be there for that MAC address. Then when another packet comes by with that MAC address as a destination, it uses that information to send it out the correct port.


This Discussion