by rand_r · 2y ago · 0 comments
My Macbook Pro currently has unique IP + Port, associated with a single process listening to it over NAT and packets you send are routed to its network interface. Next week, someone else’s laptop could have that same IP + Port. That’s the main idea here, not these exceptions.
Only on really crappy NAT implementations. My home router can have hundreds of thousands of NAT states, and yet there are only ~61k high number ports. How do you think that works?
Because it is not just "external IP at this port goes to this LAN host". Its the whole session information, SRC_PORT, DEST_PORT, SRC_IP, DEST_IP, all get figured into it.
At this moment there are several NAT states in my home router that share the same public IP:PORT combination, going to different LAN IP:PORT combinations.
An IP address is not globally unique. An IP:PORT is not globally unique. Treating them as globally unique shows a misunderstanding of networking concepts. They're often unique to a single host, but that's not a requirement.
Once again, do you really think there's a single network adapter out there that has 8.8.8.8:53?