NAT(Network Address Translation)

Have you ever heard people saying we are running out of IP addresses ? !!!! If you are a network enthusiast then may be yes… The addresses they are refering to is IPV4 addresses,then the question is aren’t we still running on IPV4 ? well the answer is yes, Despite the poorely distribution of IP addresses people(experts) found a way . The one soloution which was implemented is known as NAT(Network address translation) . while using the internet we all have ip addresses which we enter manually or we get it via DHCP .

Theses IP addresses are of the range :-

1. b/w

2. b/w

3. b/w 172 .31.255.255

These IP addresses are known as private ip addresses , which are used to communicate within an organization.But they are of no use over the internet ,That’s where NAT comes in. What NAT does is it converts the private ip addresses into public ip addresses which can be used over the internet. It maintains a tables with the enteries of private ip addresses which are mapped with public ip addresses assigned to a user .For those who dont know NAT takes place in the router. Everything major thing in this world has it types , so does NAT .

It can be applied in three ways :-

1. NAT/PAT (most common, used all the time)

2. Static (used by large organization)

3. Dynamic (not used much )

NAT/PAT (port address translation) This is the insanely common type of NAT used .


Ill try to explain it through an example …. The router shown above has two interfaces , one with the ip address and the other with the ip address . if wants to communicate to then it will be assigned a port i.e an unreserved port number (As you must be knowing ip address combined with ports are known as sockets which are used for communication). The entry will be stored in the PAT table and that page will be accesed via , Same process will be followed when wants to reach for some information. But everything cannot be perfect , what if two host ask for the same port number,this situation can occur . well there is a solution for that also , the host reaching the router first will get that port number and the second host will get the port number which is currently not in use.

DYNAMIC NAT :- It is not used much , we can say that it’s like a temporary solution for two organization to communicate which have overlapping addresses . what it does is , it creates a pool of public ip addresses and a pool of private ip addresses and if one private ip address wants to go over the internet it will be assigned a public ip address from the public ip address pool.


STATIC NAT :- Static NAT is used by big organizations . It provides one to one mapping of ip addresses . The ISP(internet service provider) provides the organization with ip addresses like up to ,these ip addresses will be mapped to till permanently (not like dynamic) . so if wants to access the internet it will always excess with ip address . We can also go one step further i.e we can assign with port numbers and use it multiple times for example if someone from outside the organization wants to reach ftp server in your organization then it can access it via (21 is ftp port number) which will direct it to ftp server in your organization similarly ( 80 is http port number) will access http server in your organization . so by using this method we can get the most out of ip addresses.