MAC address when PC disconnects

Prepare to pass CCNA, CCDA, CCIP, CCDP, CCNP, CCIE and specializations.

Moderator: sva

MAC address when PC disconnects

Postby Michael_ on Thu Jul 01, 2010 3:48 pm

How does a switch handle a frame for a PC when that PC recently disconnected? In other words, the PC's MAC address is already in the MAC table of the switch, and then the PC decides to disconnect, and then moments later a frame arrives destined for that PC. Does the switch automatically remove the table entry for the MAC address upon disconnect, or is there some predetermined wait period?
Michael_
 

Re: MAC address when PC disconnects

Postby Keith Barker on Thu Jul 01, 2010 3:48 pm

Hello Michael -

When the switchport loses link (the PC unplugs, or shuts down it's interface), the mac address will be immediately removed from the mac address-table.


Best wishes,
Keith
Keith Barker
 

Re: MAC address when PC disconnects

Postby Robin Guo on Thu Jul 01, 2010 3:49 pm

hehe, keith, i am always study from you.

i favorite it.


Best Regards
Robin Guo
Robin Guo
 

Re: MAC address when PC disconnects

Postby Michael_ on Thu Jul 01, 2010 3:50 pm

Keith, that is very helpful. Thanks.

I would like to ask a follow up question...when a PC-A sends a frame to PC-B via a switch, the switch learns the MAC for A and B. However, when PC-A sends a broadcast frame and the switch floods to PC's B, C, and D, why does the switch not learn the MAC's for B, C, and D?


Thanks again. Mike.
Michael_
 

Re: MAC address when PC disconnects

Postby TheOtherTomJones on Thu Jul 01, 2010 3:51 pm

MAC addresses are removed from the MAC address table and (I think the ARP table too) after 300 seconds by default (5 minutes).

http://www.ccietalk.com/2008/05/27/chan ... aging-time

https://supportforums.cisco.com/message/53325
TheOtherTomJones
 

Re: MAC address when PC disconnects

Postby MacM on Thu Jul 01, 2010 3:51 pm

Correct me if I'm wrong, but it will learn those mac's for B-D, but only if they respond after the flooding, ie the frame made it to the correct destination and the unlearned PC then sends back a frame with its mac in the source position. At the point in time while the switch is flooding.....the switch still does not know the macs of B-D because those devices have not spoken yet (assuming a lot here), hope that helps. Another good one to learn is what happens when one switchport has a hub connected which has multiple pc's on it, and what happens with the mac table in similar scenarios . -- mac
MacM
 

Re: MAC address when PC disconnects

Postby Pete2501 on Thu Jul 01, 2010 3:52 pm

Hey Michael,

Regarding your follow up question. Before the packet is sent an ARP is broadcasted because Host A has no record of the device. Only host B responds to the ARP request and the switch learns host A's MAC address when it receives the ARP request and learns host B's MAC address when it receives the ARP response. Hosts C and D drop the packet because the destination IP address doesn't match so the switch never receives a packet from them.

When a broadcast packet is sent and all devices respond the switch does learn the other host MAC addresses.


Chuck it in packet tracer and test it out.
Pete2501
 


Return to Cisco Career Certifications

Who is online

Users browsing this forum: No registered users and 8 guests

cron