Network Address Translation(NAT)

  • Network Address is the process of translating or mapping one IP address to another.
  • To access the internet, one public IP address is needed but we can have multiple private IP address in our private network.
  • NAT allows multiple devices to access the internet through single public IP address.
  • The device responsible for mapping multiple private IP address into single IP address is called NAT router which is placed at the boundary of our private IP address.
  • This(PAT) is one of the method to overcome IPv4 address depletion.

Working of NAT:

  • Generally border router is configured as NAT router which has one interface towards the local(inside) network and other interface is towards the global(outside) network.
  • This router maintains a table called NAT table which stores the mapping of internal IP address to global IP address.
  • When a packet traverse outside the local network, NAT router converts that local IP address to global IP address based on its content of NAT table.
  • And on reverse traffic(response) it again converts the global IP address to internal IP address.

This is basic principle on which the NAT router works.

untitled image

There are different types of NAT:

  • Static NAT
  • Dynamic NAT
  • Port Address Translation(PAT)

Static NAT:

This is like one to one mapping, means for each private IP address there will be one public IP address. Its not feasible practically as organisation need to buy large number of public IP address. This is used only when number of internal IP address is fixed.

Dynamic NAT:

In this mapping of internal IP address is done from the pool of public IP address and number of public IP address need not be same as that number of private IP address. If the mapping is found, the packet is dropped.

Port Address Translation(PAT):

This is the most common type of NAT and its many to one mapping and in this case mapping is done on the combination of port number and IP address.

Since there is a single public IP address, thus port number can be used to distinguish traffic that is which traffic belongs to which IP address.

Categories: Networking

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: