My Bday Offer- Use Code MYBDAY30

Register Now

Network Address Translation - Computer Networks

Published on Friday, December 18, 2015
Network Address Translation
We'll be learning about Network Address Translation (NAT) today. For doubts/clarifications, use the comments section and I shall revert with explanation!

==>> This article is a part of PK series (IT)

Before we start with NAT, lets quickly glance through the range of private addresses for each class available to us for private networks (LAN inside a company or home).

Class A- to
Class B- to
Class C- to

Network Address Translation (NAT) & its Forms

Allows a single device to act as an agent between Internet and private network. Only 1 unique IP address is required to represent an entire group of computers. 

Static NAT

It has one to one mapping between private and public addresses i.e one public IP for every private IPs in private network. The only benefit is that it allows a server inside private network to be reachable over internet through one to one translation. 

Dynamic NAT

It has many to many mapping between private and public addresses. It maps an unregistered IP address to a registered one from a pool of registered IP addresses in NAT router. Addresses are assigned dynamically. 

Port Address Translation (NAT Overloading)

It maps multiple private IPs to a single public IP i.e many to one mapping. Each computer on private network gets translated to the same public IP but with a different port number assignment. 

Suppose an internal host A tries to connect to a web server outside. NAT enabled router will save private IP and source port from A's packet to an Address Translation Table (ATT). It then replaces private IP with the router's IP address, generates a new port for new connection and forwards the packet over internet. Now when the return packet from web server reaches the router, it uses destination port to search ATT, obtains the private address and port numbers mapped to it and sends it to original sender. 

The Address Translation Table looks like:

Main Uses of NAT

Pooling of IP addresses

Suppose a corporate network has many hosts but only a small number of public IP addresses. It uses private address space for hosts and when a host send an IP datagram to a host in public internet, NAT device picks up a public IP from the pool and binds it to private address of the host. 
Network Address

Migration between service providers

In CIDR, IP addresses in a corporate network are obtained from service provider. Changing the service provides requires changing all IP addresses in the network. Now, this NAT device has static address translation entries which bind the private addresses to public addresses. Migration to a new service provider merely requires an update of NAT device and this migration won't be noticeable to hosts on the network. 
Network Address

IP Masquerading (Network address and port translation)

As we have assigned private addresses to hosts of the network above, NAT device will modify the port numbers for outgoing traffic. The literal meaning of masquerading is- pretending to be someone/something which you're not. 
Network Address

Load Balancing of Servers

Suppose we have to balance the load on a set of identical servers, which are accessible from a single IP address. With concept of NAT, we will assign them pvt addresses and NAT device will act as a proxy for requests to server from public network. It will change the destination IP of incoming packets to one of pvt address of a server. Usually the servers are assigned addresses in a round robin fashion
Network Address

One more important thing to learn is that NAT is not a proxy server. NAT is transparent to both source and destination hosts but proxy server is not transparent. Also NAT is a layer 3 (network) protocol while proxy server works at layer 4 (transport) or higher. 

Fun Fact of Today

The first 1 GB hard disk was announced in 1980 which weighed around 550 pounds and had a price tag of $40,000. 
(And these days one of them is surely not enough for us!)

                                                                                                                              Deepak A
ebook store

About us

ramandeep singh

Ramandeep Singh, your guide to banking and insurance exams. With 14 years of experience and 5000+ selections, Ramandeep understands the path to success, having transitioned himself from Dena Bank and SBI. He's passionate about helping you achieve your banking and insurance dreams.

  • Follow me:
Close Menu
Close Menu