2 ms·
> We have NAT, and NAT works Until it doesn't. NAT is fine for a home or company network, it'll soon be getting not fine for mobile and other networks. Using N
by dspillett 5y ago
> We have NAT, and NAT works
Until it doesn't. NAT is fine for a home or company network, it'll soon be getting not fine for mobile and other networks. Using NAT you are not simply hiding the identity of individual devices you are sacrificing concurrent connections per device for fake extra address space, that will run out eventually with more and more devices being connected (you might say “my smart bulbs don't need to access the public network” but your smart bulb manufacturer appears to think differently!). IIRC Linux defaults to a range of 32768–60999 for port mapping so about 28,000 maximum concurrent connections per public IPv4 which seems a large number but if you have many users using P2P protocols (potentially hundreds of connections per host) or many many just web browsing (tens per host that is currently active) that can soon run out and connections start failing in a manner that is hard to diagnose at the client end (it just looks intermittent) and near impossible to diagnose at the far end.
And it is a pain for true P2P comms even at one level, never mind nested NAT if you and your ISP are both doing it.
NAT doesn't help for needing more publicly addressable addresses on the other side either, it only helps with your side of the problem. You will eventually have to move off IPv4 because services will start to be IPv6 only. Yes there are ways to essentially reverse-NAT around that (for instance HTTPS+SNI is now viable in most cases as you are only excluding really ancient devices) but those techniques also add complexity & latency and won't work for everything. Nor is the issue simple numbers: the distribution if IPv4 blocks is not at all smooth and working around that adds complexity to routing (yes large orgs have released some of the v4 allocations back for reuse, but that is far from as simple as just saying “hey, you over there, these are now available to use”.
If your reason for using NAT is security then be aware that what security/privacy you do get is only by accident and probably not as effective as you think anyway, certainly against meaningful tracking.
- mercora 5y agoi agree with mostly everything you said but i think your calculation is wrong. to figure out how to map addresses not only the destination port can be taken to account but the addresses themselves and the source port too. that makes 28k (that figure is questionable too) concurrent connections per single connected IP and port on the far end. i am also somewhat certain if this would become a real issue the fix would probably involve mapping connections using more state like sequence numbers in TCP or similar things instead of abandoning this idea entirely and for good.