Comment on How does a game server differentiate between multiple clients on the same network? Do they even?
Onomatopoeia@lemmy.cafe 1 week agoMac never leaves the LAN.
The switch in your router knows what to do with your MAC - because that’s hardware level communication.
Even your machine’s IP doesn’t leave your network, your router tracks which interface your IP is on, and keeps a table of local IP:Port mapped to Destination IP:Port on the external interface.
And when you really dig into IP routing, I think the router system actually maps IP to interface, and doesn’t even know about MAC addresses because that’s a layer 2 functionality and routing is layer 3 - so it merely hands a routed packet to the appropriate interface and the switch then maps IP:MAC. But it’s been a long time since I dove into router programming internals.