Networking – Why do we have NAT if we could just assign a public IP address

nat;networking

If the private address block is simply used to allow the router to determine where packets can and cannot be forwarded from (because private addresses need to be unique on their own network, but can repeat on different networks), then why would you need a network address translation service?

Why wouldn't you just skip the private address altogether and assign a public one if the host needs to connect to a network?


Thanks to everyone, the answer is much clearer now. The reasoning for the private addresses had escaped me, and I was confused why we would need it when so many IP addresses were wasted through classed addressing. I didn't (and still don't really) understand why we couldn't have just reassigned IP's to make better use of the addresses that we already have.

Best Answer

One reason NAT exists is because, with IPv4, there are a severely limited number of addresses available (a theoretical maximum of about 4.3 billion). For this reason, in most residential circumstances, an Internet Service Provider provides at most one public IP address to a subscriber at a time. If you would like to send and receive packets on multiple machines, it is necessary to have some kind of a local-public conversion, in other words NAT.

IPv6 will change all that as there should be something like thousands or millions of IP addresses per square foot of the Earth's surface.

Related Question