cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
934
Views
2
Helpful
12
Replies

How a switch handle duplicated MAC address on different ports?

swanming
Level 1
Level 1

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.

2 Accepted Solutions

Accepted Solutions

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

View solution in original post

balaji.bandi
Hall of Fame
Hall of Fame

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.

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

12 Replies 12

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

balaji.bandi
Hall of Fame
Hall of Fame

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.

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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!

 

swanming
Level 1
Level 1

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.

but when you moving device you disconnect from first port, and SW will remove mac for any port nonconnect.
MHM

How can this be done? by what kind of protocol? 

thanks.

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

Take below pic as an example, PC1 is connected to SW fa0/1 via a hub.

image.png

In below pic, PC1 is disconnect and connected to SW fa0/2, on the SW, no cable is disconnected.

image.png

In the above case, will the SW delete the outdated entries of PC1 on its MAC address table?

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

"That why we dont use hub in network."

As same situation arises with multiple switches, I would disagree.

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).

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

Review Cisco Networking for a $25 gift card