Network Address Translation

Godson PrakasiaGodson Prakasia
1 min read

In networking, NAT stands for Network Address Translation. It’s a method used by routers to translate private (local) IP addresses into a public IP address (and vice versa) when data is going to or coming from the internet.

Why NAT is used:

  • IP address conservation: IPv4 addresses are limited. NAT allows multiple devices in a local network (like your home Wi-Fi) to share a single public IP address.

  • Security: It hides internal IP addresses from the outside world.


Types of NAT:

  1. Static NAT:

    One private IP is mapped to one public IP.

    πŸ”„ Always same mapping.

  2. Dynamic NAT:

    A private IP is mapped to any available public IP from a pool.

    πŸ” Not fixed.

  3. PAT (Port Address Translation) – also called NAT Overload:

    Many private IPs share one public IP, distinguished using port numbers.

    🌐 This is the most common form, used in home routers.


Example:

  • Your phone has a private IP: 192.168.1.10

  • Your router has a public IP: 123.45.67.89

When your phone accesses a website:

  • NAT converts 192.168.1.10 ➜ 123.45.67.89:port

  • The website responds to 123.45.67.89:port

  • NAT converts it back to 192.168.1.10


Let me know if you want a diagram or real-world analogy!

0
Subscribe to my newsletter

Read articles from Godson Prakasia directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Godson Prakasia
Godson Prakasia