Let’s start with the basics:
“Network address translation (NAT) is a method of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) datagram packet headers while they are in transit across a traffic routing device.”
Before configuring NAT in your network, you should know the interfaces on which NAT will be configured and for what purposes. The following requirements will help you decide how to configure and use NAT:
Define the NAT inside and outside interfaces if:
Users exist off multiple interfaces.
Multiple interfaces connect to the Internet.
Define what you need NAT to accomplish:
Allow internal users to access the Internet.
Allow the Internet to access internal devices such as a mail server.
Allow overlapping networks to communicate.
Allow networks with different address schemes to communicate.
Allow the use of an application level gateway.
Redirect TCP traffic to another TCP port or address.
Use NAT during a network transition.
How NAT Works
A device that is configured with NAT will have at least one interface to the inside network and one to the outside network. In a typical environment, NAT is configured at the exit device between a stub domain and the backbone. When a packet leaves the domain, NAT translates the locally significant source address into a globally unique address. When a packet enters the domain, NAT translates the globally unique destination address into a local address. If more than one exit point exists, each NAT must have the same translation table. If NAT cannot allocate an address because it has run out of addresses, it drops the packet and sends an Internet Control Message Protocol (ICMP) host unreachable packet to the destination.
Uses of NAT
NAT can be used for the following scenarios:
To connect to the Internet, but not all of your hosts have globally unique IP addresses. Network Address Translation (NAT) enables private IP internetworks that use nonregistered IP addresses to connect to the Internet. NAT is configured on a device at the border of a stub domain (referred to as the inside network) and a public network such as the Internet (referred to as the outside network). NAT translates internal local addresses to globally unique IP addresses before sending packets to the outside network. As a solution to the connectivity problem, NAT is practical only when relatively few hosts in a stub domain communicate outside of the domain at the same time. When this is the case, only a small subset of the IP addresses in the domain must be translated into globally unique IP addresses when outside communication is necessary, and these addresses can be reused when they are no longer in use.
Change your internal addresses. Instead of changing the internal addresses, which can be a considerable amount of work, you can translate them by using NAT.
Source : Cisco
In the future we will make a complete guide on NAT