12-02-2023 01:29 AM
Hello, I am studying CCNA and have a question about MAC address table.
Let say I have a switch which have f0/3 connected with a PC with MAC address 0000.0000.0011.
Now i remove the cable of f0/3 and connect to f0/4.
By default they should be some protocol such as CDP which the swithc will learn the MAC address of 0000.0000.0011 on f0/4.
By default the aging time is 300 second, so there will be the same MAC address 0000.0000.0011 on both f0/3 and f0/4 interface for 300 seconds?
May I ask how cisco switch handle with this case, thank you.
Solved! Go to Solution.
12-02-2023 01:42 AM
SW will generate log for moving mac and forward traffic to new port that learn mac
Here SW without secuirty dont do anything
If you use port secuirty then SW will shut the port or drop traffic.
MHM
12-02-2023 01:45 AM
its generally not happens in real environment, until some users try to plug and trying different port. (that is not best practice)
Once the device is moved to NEW Port, it create the new entry in the mac-address table with source mac associated with the interface.
MAC address table can not hold duplicate mac Address, so it will update with new information what switch received.
You can also restrict the devices not move like this using port-security - in this case due to violation of move - the port will be error disabled.
12-02-2023 01:42 AM
SW will generate log for moving mac and forward traffic to new port that learn mac
Here SW without secuirty dont do anything
If you use port secuirty then SW will shut the port or drop traffic.
MHM
12-02-2023 01:45 AM
its generally not happens in real environment, until some users try to plug and trying different port. (that is not best practice)
Once the device is moved to NEW Port, it create the new entry in the mac-address table with source mac associated with the interface.
MAC address table can not hold duplicate mac Address, so it will update with new information what switch received.
You can also restrict the devices not move like this using port-security - in this case due to violation of move - the port will be error disabled.
12-02-2023 01:48 AM
thats important when you bring out the concept that MAC address table can not hold duplicate MAC address.
I thought the SW will hold 2 entries of the same MAC address with different port so that will hang when frames come in with that MAC address as destination.
Thank you!
12-02-2023 01:25 AM
Hello, I am studying CCNA and have a question about MAC address table.
Let say I have a switch which have f0/3 connected with a PC with MAC address 0000.0000.0011.
Now i remove the cable of f0/3 and connect to f0/4.
By default they should be some protocol such as CDP which the swithc will learn the MAC address of 0000.0000.0011 on f0/4.
By default the aging time is 300 second, so there will be the same MAC address 0000.0000.0011 on both f0/3 and f0/4 interface for 300 seconds?
May I ask how cisco switch handle with this case, thank you.
12-02-2023 02:12 AM
but when you moving device you disconnect from first port, and SW will remove mac for any port nonconnect.
MHM
12-02-2023 02:13 AM
How can this be done? by what kind of protocol?
thanks.
12-02-2023 03:13 AM
No protocol need
If SW see cable disconnect it mark port as no connect and remove all mac from that port and not wait mac to aging.
MHM
12-02-2023 03:25 AM - edited 12-02-2023 03:26 AM
Take below pic as an example, PC1 is connected to SW fa0/1 via a hub.
In below pic, PC1 is disconnect and connected to SW fa0/2, on the SW, no cable is disconnected.
In the above case, will the SW delete the outdated entries of PC1 on its MAC address table?
12-02-2023 03:37 AM
Good Q
When hub in network the issue start to appear.
Yes you will see traffic disruption since SW can not mark port as nonconnect and depend on again of mac.
So from time pc move to time mac aging you will see traffic drop.
That why we dont use hub in network.
MHM
12-02-2023 04:30 AM
"That why we dont use hub in network."
As same situation arises with multiple switches, I would disagree.
12-02-2023 04:27 AM
Switch will continue to send PC1 frames to hub until MAC table ages out (when it will flood) or until it "knows" PC1 is on a different port (which is NOT known just by connecting PC1 to a switch port).
12-02-2023 04:21 AM
As already mentioned by @MHM Cisco World, in your example, disconnecting from the original port will cause that switch to flush its MAC/port entry. But suppose you had:
PC<>sw1<>sw2
When you disconnect PC sw1 will flush the MAC but sw2 will not! If will continue to send PC frames to sw1 until the MAC ages out.
Perhaps a more interesting variation of your question, suppose you start with:
PC<>sw1<>sw2<>sw3
Then move PC to have:
sw1<>sw2<>sw3<>PC
What happens then?
Answer is an "it depends". (Also the case in OP example, but more so in this case.)
Basically, there's no "protocol" to insure, in OP case or my case, there won't be an issue. Often we don't bump into the problem cases, but if you don't understand how L2 switches work, one can be quite confused why it's "broke" especially as problem may resolve itself after a second or two or a few minutes.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide