Skip to content
Shubham Lad

What is NAT?

Edit page

NAT

Network Address Translation (NAT) is a service used in routers to facilitate the translation of one set of IP addresses to another. It serves a vital role in preserving the limited pool of public IPv4 addresses by assigning single public IP to multiple devices connected to the network. Let’s delve into the intricacies of NAT, examining its core types and functions, while exploring its limitations and the emergence of IPv6.

Limitations of IPv4:

To overcome these challenge, engineers devised the concept of private IP addresses and introduced NAT, revolutionizing network addressing.

Two types of IP:

Public: - they are publicly registered - You must have public IP to access internet Private - They are not publicly registered - you can’t access internet with this IPs - they are reserved for use within local network environments, such as homes and businesses.

In your home or business, you’ve got lots of devices that want to go online, and for that, they need public IP addresses.

One way to do this is by asking your internet provider for more public IPs, but that can be costly and uses up valuable public IP addresses. In fact, the demand for internet access is much higher than the number of available public IPs, so if we assigned one to each device, we’d quickly run out.

Instead, what we can do is have our router give our devices private IP addresses. When a device needs to go online, a clever system called NAT steps in. It takes our device’s private IP and turns it into the public IP given by our internet provider, kind of like a disguise for the internet. This way, our devices can access the internet without using up all the precious public IPs.

NAT handles not only the translation of private to public IP addresses but also the reverse, enabling servers from the internet to communicate with devices within the local network.

The Future with IPv6:

Types of NAT:

NOTE: NAT only used for IPv4

Lets understand this by example:

Static Network Address Translation

Static NAT

Dynamic Network Address Translation

Dynamic NAT

Port Address Translation (PAT)

PAT

More about PAT

By using PAT, home networks can optimize their use of public IP addresses, ensuring that all devices can access the internet efficiently without the need for a separate public IP address for each device. This approach is a practical solution to address the limitations of the IPv4 address space and is commonly employed in modern network configurations.


Edit page
Share this post on:

Previous Post
Build a Serverless Plugin
Next Post
OSI Layers Part 1