Updated July 7, 2023
Introduction to NAT
NAT stands for Network Address Translation used to solve the problem of shortage of IP address by allowing a user to have access to the large several IP addresses. To use the NAT, internet authorities specified that certain IP addresses must be used as only internal IP address, others should be used as external IP address, User can access the more IP address internally but one address externally, Internal traffic can work with internal address and external traffic work with the external address.
Types of NAT
NAT usually operates on a firewall or router to enable internet access to the localhost by changing private IP address to Global IP address or vice versa.
1. Static NAT
Static NAT is a private IP address that is a single unregistered IP that is mapped with a legal Public IP address. Here one to one mapping is made within local and global address which is generally applied for web hosting. But they are not applicable in companies as many people use the internet and need internet access where the public IP address is mandatory. For example, If there 5000 servers that need internet access, the company has to buy 5000 public addresses, which is expensive.
2. Dynamic NAT
Dynamic NAT is an unregistered IP address that is private is changed to a registered public address from a group of the public IP address. If the IP address group is occupied, then the packets are transmitted with a fixed number of the private IP address that can be transmitted to the public address. For example, if there is a group of two public IPs, and it can be accessed by two private IP’s can be transmitted at the estimated time. But if there is any need for the third IP to access the internet, then the packet is transmitted since many private IP addresses are connected to a group of public IP addresses. NAT is deployed when there is a finite number of internet users because to create a global IP address pool is very expensive.
3. Port Address Translation
Port Address Translation is called NAT overload, where many private IP addresses can be transmitted into unit registered IP addresses. The port numbers are applied to differentiate the traffic flow that belongs to an individual IP address. This is frequently used as a cost-saving method since thousands of servers can be connected to the internet by one real global public IP address.
Working
- Two interfaces are configured in NAT, a border router, one router has an interface in local inside the network, and another interface is present in the global outside the network.
- When a packet is transmitted to the outside and inside the network, then network address translation modulates the local IP address to the global IP address. But when a packet enters the inside or local network, then the global IP address is modulated to the local IP address.
- In NAT, if there is no IP address is available, then the packets are transmitted, and an Internet Control Message Protocol’s host unreachable packets are delivered to the given destination.
- In a network, two different host A and B, are mapped, and if both ask for the same destination port with the same port number, say 2000 on the host side simultaneously, then NAT performs only the change of IP address and when the packets arrived at NAT both of the A and B IP addresses are masked by the global or public IP address of the established network and delivered to the estimated destination.
- The public IP address of the router receives a delivery message from the destination port. Once a reply is received, it will be confusion to NAT about the origin of the host reply because of their two identical port numbers A and B. To overcome such problems, NAT masks the source port number and changes the entry table of NAT.
- The inside IP address can be modulated, whereas the outside IP address is not in direct to control of the organization. The change or translation of address is made inside and outside of the network.
Advantages and Disadvantage of NAT
Let us see some advantages and disadvantages.
Advantages
1. NAT helps in preserving the IPv4 address space when the user uses NAT overload
2. NAT enhances the reliability and flexibility of interconnections to the global network by deploying multiple source pools, load balancing pool, and backup pools.
3. NAT has a prominent network addressing method. If there is the usage of a global IP address, then address space should be properly assigned. Because when a network is developed, there might be a need for many IP address
4. NAT gives an added layer of security in the network because the host inbuilt in the NAT network are unreachable by other network devices as per user preference.
Disadvantages
1. When a guest request for remote access, it will double-check whether connections are from the router belongs to NAT. But some guests established the connection from another host; if the particular user doesn’t respond to the correct host, then it will get a request, another host. This criterion will lead to degrading in the performance of the network
2. If multiple applications and protocols rely on end-to-end functions, then the user’s network cannot be accessible by other users. Because the host is inbuilt inside the NAT network, which is unreachable, as discussed above
3. If there is any need to troubleshoot the network from remote areas, troubleshooting will be tough and lead to loss of end traceability.
4. Application of tunnelling protocols makes more complications because of NAT translated values in IP headers, and it also interrupts in integrity verifications made by IPsec and left tunnelling protocols.
5. Services that need UDP or TCP installation connections from the global side can be impacted and maybe not reachable at times.
Recommended Articles
This has been a guide to What is NAT. Here we also discuss what is NAT? its types with the advantages and disadvantages of NAT. You may also have a look at the following articles to learn more –