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
Tap and go - the lowdown on contactless payments
How to Evaluate New Crypto Projects Before Investing: A Comprehensive Guide
What Is Single Sign-on (SSO)? Meaning and How It Works? | Fortinet
55Th And Kedzie Elite Staffing
Trevor Goodwin Obituary St Cloud
It may surround a charged particle Crossword Clue
Craigslist Cars Augusta Ga
Obor Guide Osrs
What happened to Lori Petty? What is she doing today? Wiki
Mychart Mercy Lutherville
Overnight Cleaner Jobs
41 annonces BMW Z3 occasion - ParuVendu.fr
Devourer Of Gods Resprite
Locate Td Bank Near Me
Slag bij Plataeae tussen de Grieken en de Perzen
Builders Best Do It Center
Dump Trucks in Netherlands for sale - used and new - TrucksNL
Most McDonald's by Country 2024
Jesus Calling Oct 27
Acts 16 Nkjv
Hdmovie2 Sbs
Poe Str Stacking
Atdhe Net
Yog-Sothoth
Teekay Vop
Elbert County Swap Shop
Sienna
Finding Safety Data Sheets
Ltg Speech Copy Paste
Dr Seuss Star Bellied Sneetches Pdf
Wonder Film Wiki
Unity Webgl Car Tag
Die wichtigsten E-Nummern
Craig Woolard Net Worth
United E Gift Card
Texters Wish You Were Here
How to Play the G Chord on Guitar: A Comprehensive Guide - Breakthrough Guitar | Online Guitar Lessons
Edict Of Force Poe
Shih Tzu dogs for sale in Ireland
ENDOCRINOLOGY-PSR in Lewes, DE for Beebe Healthcare
Frommer's Philadelphia & the Amish Country (2007) (Frommer's Complete) - PDF Free Download
Bartow Qpublic
11526 Lake Ave Cleveland Oh 44102
Craigslist Com Panama City Fl
Subdomain Finder
Alston – Travel guide at Wikivoyage
Ladyva Is She Married
Booknet.com Contract Marriage 2
Is Ameriprise A Pyramid Scheme
Samantha Lyne Wikipedia
Otter Bustr
Obituary Roger Schaefer Update 2020
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.