2 added 164 characters in body
source | link

Further to JFL's answer, many devices will send gratuitous ARP when the link comes up; switches correspondingly should invalidate their MAC table for a given port when the link state changes. In your example, when you swap devices C and D on their ports PC and PD, when the cables are removed the link should go down and the switch should remove their addresses from the table.

If you swap the MAC addresses (by reconfiguring) on a system which doesn't send a gratuitous ARP, a switch might send the frames out of the wrong port until somethinga transmission triggered andan update. (TCP retransmissions for example.) A Switches also remove MAC addresses which are too old, so eventually it would be pruned in any case.

A switch with a good algorithm should notice transmissions to a MAC address which isn't replying and remove it from the table, just like aging out. It's a good experiment to try on different switches if you can get a host to behave in this way.

Further to JFL's answer, many devices will send gratuitous ARP when the link comes up; switches correspondingly should invalidate their MAC table for a given port when the link state changes. In your example, when you swap devices C and D on their ports PC and PD, the switch should remove their addresses from the table.

If you swap the MAC addresses (by reconfiguring) on a system which doesn't send a gratuitous ARP, a switch might send the frames out of the wrong port until something triggered and update. (TCP retransmissions for example.) A switch with a good algorithm should notice transmissions to a MAC address which isn't replying and remove it from the table, just like aging out. It's a good experiment to try on different switches if you can get a host to behave in this way.

Further to JFL's answer, many devices will send gratuitous ARP when the link comes up; switches correspondingly should invalidate their MAC table for a given port when the link state changes. In your example, when you swap devices C and D on their ports PC and PD, when the cables are removed the link should go down and the switch should remove their addresses from the table.

If you swap the MAC addresses (by reconfiguring) on a system which doesn't send a gratuitous ARP, a switch might send the frames out of the wrong port until a transmission triggered an update. (TCP retransmissions for example.) Switches also remove MAC addresses which are too old, so eventually it would be pruned in any case.

A switch with a good algorithm should notice transmissions to a MAC address which isn't replying and remove it from the table, just like aging out. It's a good experiment to try on different switches if you can get a host to behave in this way.

1
source | link

Further to JFL's answer, many devices will send gratuitous ARP when the link comes up; switches correspondingly should invalidate their MAC table for a given port when the link state changes. In your example, when you swap devices C and D on their ports PC and PD, the switch should remove their addresses from the table.

If you swap the MAC addresses (by reconfiguring) on a system which doesn't send a gratuitous ARP, a switch might send the frames out of the wrong port until something triggered and update. (TCP retransmissions for example.) A switch with a good algorithm should notice transmissions to a MAC address which isn't replying and remove it from the table, just like aging out. It's a good experiment to try on different switches if you can get a host to behave in this way.