Network address translation (NAT) is a method of remapping one IP address space into another by modifying network address information in
(IP) Internet Protocol datagram packet headers while they are in transit across a traffic routing device.
This technique was originally used for ease of rerouting traffic in IP networks without readdressing every host.
In more advanced NAT implementations featuring IP masquerading, it has become a popular and essential tool in conserving global address
space allocations in face of IPv4 address exhaustion by sharing one Internet-routable IP address of a NAT gateway for an entire private network.
IP masquerading is a technique that hides an entire IP address space, usually consisting of private IP addresses, behind a single IP address in another, usually public address space. The address that has to be hidden is changed into a single (public) IP address as "new" source address of the outgoing IP packet so it appears as originating not from the hidden host but from the routing device itself. Because of the popularity of this technique to conserve IPv4 address space, the term NAT has become virtually synonymous with IP masquerading.