What Is NAT? How Does NAT Work? [Beginners Guide] (2024)

In this blog we will look at what is NAT(Network Address Translation) and the key concepts and workflows involved in NAT.

What is NAT?

NAT stands for Network Address Translation. Network Address Translation, as the name indicates, translates a given set of private IP addresses to a single public IP address attached to a gateway device. For example, a home modem or a firewall device in an organization.

To address the IPV4 exhaustion issue, the private IP ranges was introduced and organisations could use the private IP ranges for their tens of thousands of computers and servers. But the problem is, when you have a private network with devices having private IP addresses, you cannot route the traffic to public Internet because the destination server cannot route the response to the private IP range.

Here is where NAT comes in to picture. The gateway device in your home or organization connected to the ISP with a public address will do the Natting. When it comes to cloud platforms like AWS, Azure, or Google cloud, a NAT gateway gets deployed in public subnet for servers in the private subnet to communicate to the outside world.

Also, you might want to keep the private network secure from the external network.

Now let’s understand how NAT works.

How Does NAT Work?

Here is a high level architecture of a request that goes via NAT device (Router).

What Is NAT? How Does NAT Work? [Beginners Guide] (1)

So here is how it works.

Step 1: A computer in the private network tries to access a public website. For this example, lets assume it as google.com.

Step 2: The request packet first reaches the router. The router has a public IP address. It adds its public address as the source IP address in the request IP packet header and forwards the request, as shown in the image below. You can also call this process as “masquerading”.

What Is NAT? How Does NAT Work? [Beginners Guide] (2)

Step 3: The request reaches the server (google.com) and it sends the webpage as response by altering the source to the servers IP and destination as routers public IP as shown in the image above.

Step 4: When the response reaches the router, it modifies the destination address to the requested computers private IP address as shown in the image above.

The router keeps track of requests via the NAT table. It is a unique table managed by the NAT-enabled device. In our example, it’s a router. With the NAT table information, the router knows from which device the request started and to which device it should send the response back.

What Does NAT solve?

NAT solves a bigger problem with IPV4 exhaustion.RFC1918(Private IP ranges) is made possible due to NAT. RFC1918 Subnets has the following ranges.

  1. 10.0.0.0/8
  2. 172.16.0.0/16 (172.16/12 prefix)
  3. 192.168.0.0/16

NAT FAQ’s

Does NAT maps MAC adddress?

No. NAT works on the Network layer (Layer 3) where it deals with with packets. While MAC address belong to the data-link layer.

Do you need a NAT for Servers With public IP & Internet Connectivity?

No. NAT is designed for devices with private IP ranges to connect to internet.

Conclusion

In this blog we learned about the important concepts in Network Address Translation. NAT is a very important topic when it comes to cloud networking.

Every DevOps engineer should know about NAT and how it works. In my becoming a DevOps engineer guide, I have spoken about learning NAT in the networking section.

Further Reading & References

[1].RFC-2663: Network Address Translator (NAT) Terminology and Considerations

What Is NAT? How Does NAT Work? [Beginners Guide] (2024)
Top Articles
Bad Breath - Dream Smile Dental Clinic
The Importance of Generation Z to the Insurance Industry
The Tribes and Castes of the Central Provinces of India, Volume 3
Chs.mywork
Parke County Chatter
Ups Stores Near
Collision Masters Fairbanks
Here's how eating according to your blood type could help you keep healthy
Carter Joseph Hopf
Bbc 5Live Schedule
Florida (FL) Powerball - Winning Numbers & Results
Oscar Nominated Brings Winning Profile to the Kentucky Turf Cup
R/Afkarena
Otterbrook Goldens
Jenn Pellegrino Photos
Cambridge Assessor Database
How pharmacies can help
The Menu Showtimes Near Regal Edwards Ontario Mountain Village
Vrachtwagens in Nederland kopen - gebruikt en nieuw - TrucksNL
Aris Rachevsky Harvard
Where Is George The Pet Collector
Pecos Valley Sunland Park Menu
Gazette Obituary Colorado Springs
Understanding Gestalt Principles: Definition and Examples
Jordan Poyer Wiki
Wat is een hickmann?
Hannah Jewell
Southtown 101 Menu
5 Star Rated Nail Salons Near Me
Martin Village Stm 16 & Imax
Garrison Blacksmith's Bench
Police Academy Butler Tech
Space Marine 2 Error Code 4: Connection Lost [Solved]
8005607994
Culver's of Whitewater, WI - W Main St
Fapello.clm
Infinite Campus Parent Portal Hall County
Costco Gas Foster City
Panolian Batesville Ms Obituaries 2022
Flappy Bird Cool Math Games
Blow Dry Bar Boynton Beach
Costco The Dalles Or
Menu Forest Lake – The Grillium Restaurant
Gt500 Forums
Greatpeople.me Login Schedule
Coleman Funeral Home Olive Branch Ms Obituaries
Jesus Calling Oct 6
Ok-Selection9999
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6212

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.