The need for NAT
NAT is most commonly used to circumvent the problems caused by the shortage of public IP addresses. Due to the exhaustion of public IPv4 addresses, private networks predominately use IPv4 addresses defined in RFC 1918 (RFC, or Request for Comment, being the form of publication for the development and adoption of standards of communication for the internet). These are comprised of the following ranges:
These addresses are reserved for use in private environments that are isolated from one another. Traffic to external services hosted on the internet from these ranges (and the networks they are comprised of) should either be translated into public IP addresses or be discarded by the upstream routers.
Conversely, services hosted in private networks usually reside on hosts with private IP addresses. To make these services accessible from the outside, they are statically translated...