How common is NAT within companies (one public ip address)?

Solution 1:

Only one of the companies I've worked for since 1995, and that's quite a lot of companies, uses public IP addresses for desktop clients. So for me, the answer is: very common indeed.

I would very strongly advise against deploying software that makes the assumption that ipv4 addresses are unique to end-users, at this stage of the v4 deployment.

ipv6, that's a different kettle of ball games.

Solution 2:

I have never seen any company use public IPs for their desktops or internal servers, and these days it is also very rare for externally facing servers (eg webservers) to have a public IP address - usually these are NATed behind load balancers, or ever more commonly, are virtual servers in a dynamic server pool, so don't even really exist.

The NAT'ing may not be down to the level of all internal IP's to one external, usually there are ranges, however it is the overwhelming norm for NAT'ing to be used in one form or another.

Solution 3:

While one-to-one IP to user association is laughably uncommon for internet communications, they're a lot more common for intranet communication. Multiple NAT gateways inside a network are not common, but also not unheard of. In the cases where you run into internal NAT, it's likely because two entities (perhaps due to mergers) have their own independent Internet access and maintain a dedicated link for talking to the other entity, and that link is likely to be guarded by a firewall/NAT.

Solution 4:

Even if a company has loads of public IP addresses, they now prefer to NAT them to hide their internal network structure for security reasons. Most companies will use combination boxes that provide both NAT and firewall functionality. Hence, you can safely assume NAT's in companies networks 99.99% of the time. If you are developing applications that require connecting to computers inside a company, then you definitely need to consider one of the various "NAT Traversal" techniques .. see http://en.wikipedia.org/wiki/NAT_traversal (not very easy to work with, but an evil necessity).

Solution 5:

It is extremely common. If it is already an integral part of your application then perhaps you could alter it to use the socket (ie the IP address and port number that nat has assigned)?