Network address translation (NAT)
It is a method of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) data gram packet headers while they are in transit across a traffic routing device.[1] The technique was originally used for ease of rerouting traffic in IP networks without readdressing every host. 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.Static NAT (One to One mapping):One to one mapping is also called static NAT it’s put a permanent ip mapping between an private ip address and a public ip address.
NAT Overloading: It’s called Port Address Translation or PAT.In this case multiple private ip address space are able to share a common public ip address. Port address translation is reducing number of public ip address for network address translation.
Dynamic NAT: Another NAT method are Dynamic NAT. Dynamic map puts a dynamic mapping between an internal private ip address pool and a public ip address pool.It’s also create one to one relation on a FIFO algorithm basis .This method mikrotik router called netmap.
NETMAP Configuration Example:
/ip firewall nat add chain=dstnat action=netmap to-addresses=172.16.90.0/16
dst-address=1.2.3.0/25 log=no log-prefix=""
/ip firewall nat add chain=srcnat action=netmap to-addresses=1.2.3.0/25
src-address=172.16.90.0/16 log=no log-prefix="
This configuration tell us a pool of ip address that are 172.16.90.0/16 mapped between a pool of an public ip address that are 1.2.3.0/25 is dynamically.