Ethernet – Why don’t switches rewrite mac-addresses

ethernetmac addressprotocol-theory

Is there any particular reason why Ethernet switches don't change the MAC address of a packet?

Is it for end host identification using the MAC address, or anything else?

Best Answer

If a switch were to change MAC addresses, this would break networking entirely.

The MAC address is a unique identifier which is used by hosts on the local network.

If the switch were to change the destination MAC, the frame would not get delivered to the appropriate host. In the cases that it would, for example if the frame gets flooded, the destination host would drop it because it would no longer be destined for the host.

If the switch were to change the source MAC address, the destination host would use this MAC address for any responses (including updating any ARP entries with bad data). This would result in the same situation I already described, just for all return traffic.

This could further create problems with things like 802.1X and other mechanisms that use the MAC address to identify/classify the device.

Could mechanisms be developed to do this? I am sure they could. But there is no reason to do so at this point and this would only complicate networking and add unnecessary processing. We are not close to exhausting the available MAC address pool so there is no need for something like MAT (don't know if the concept of MAC address translation even exists anywhere so maybe I just coined a term?).

Related Topic