Search code examples
network-programmingmac-addressosi

What happens when a L2 packet has same source and destination MAC address


When a L2 packet has the same source and destination MAC address does it go out of the stack of the host to the switch and come back to the same interface ? Or is the L2 packet with the same source and destination MAC moved from the TX ring of the host to the RX ring and the above layer picks it up ?

If it goes to the switch, if at all it is legitimate, shouldn't the switch drop the packet as it could mean an attack ?


Solution

  • Typically, it depends on the switch. In general a switch in the network will not forward a packet out of port on which it was received, whether it was destined for the same MAC address or not.