I was wondering, what happens if I send a packet with layer 2 destination (say 1ebf) different that what will receive it, lets say a router (mac 22ff) recieves it. Will it drop the packet? Or broadcast it?
1 Answer
On the data link layer (L2), if any frame arrives at a NIC with a destination address that that NIC isn't configured to receive for, then that frame is simply ignored/dropped.
While modern networks are switched and switches forward only towards the addressed destination (by learning the source addresses and their ports from every frame they receive), initial Ethernet was a purely broadcast network and each and every frame transmitted was received by every host on a network. Accordingly, ignoring non-local destination addresses is standard behavior.
Whether the receiving device is a NIC in a host or a router doesn't matter.
If a switch receives a frame it forwards that frame by its destination address to the port where it has previously received frames with that address as source. If the destination address is entirely unknown then the switch mimics a simple repeater and floods that frame out of all its ports except for its source port, emulating a broadcast network. As described above, only the node with that L2 address actively receives that frame, all the others ignoring it.