Table of Contents

Network Address Translation (NAT)

Network Address Translation (NAT) is a technique that allows multiple devices on a private network to share one or more public IP addresses when communicating with the Internet.

Today, NAT is used in almost every home and office network.


Why Is NAT Needed?

Most devices use private IP addresses, which cannot be routed across the Internet.

For example:

Laptop

192.168.1.20

A website on the Internet cannot send packets directly to this address.

Instead, a router performs Network Address Translation (NAT).


How NAT Works

Suppose your home router has:

Public IP

203.0.113.25

Your laptop has:

Private IP

192.168.1.20

When you visit:

https://example.com

the router replaces the source address.

Before NAT:

Source

192.168.1.20

Destination

93.184.216.34

After NAT:

Source

203.0.113.25

Destination

93.184.216.34

The website never sees your private IP address.


Home Network Example

Laptop
192.168.1.20
        │
Phone
192.168.1.21
        │
TV
192.168.1.22
        │
        ▼
Wi-Fi Router
NAT
Public IP
203.0.113.25
        │
        ▼
Internet

All three devices share the same public IPv4 address.


IPv4 provides about:

4.3 billion addresses

This is not enough for every Internet-connected device.

NAT allows thousands of devices to share a much smaller number of public addresses.

Without NAT, IPv4 exhaustion would have occurred much earlier.


Advantages of NAT


Disadvantages of NAT

NAT also has some drawbacks.


NAT and IPv6

IPv6 provides an enormous address space.

Therefore, IPv6 generally does not require NAT.

Each device can have its own globally unique IPv6 address.


Carrier-Grade NAT (CGNAT)

Some Internet Service Providers perform NAT on their own networks.

This is called Carrier-Grade NAT (CGNAT).

Example:

Your Computer
↓

Home Router
↓

ISP NAT
↓

Internet

With CGNAT:


NAT and Telenegar

Several Telenegar tools help illustrate NAT.

IP Check

Your computer may have:

192.168.1.20

while Telenegar reports:

203.0.113.25

This difference is usually caused by NAT.


Traceroute

When using Telenegar Traceroute, the first hop is often your home router.

Example:

1  192.168.1.1
2  ISP Gateway
3  ...

The first hop is the device performing NAT and forwarding your traffic toward the Internet.


Common Misconceptions



nat ipv4 ipv6 networking traceroute ipcheck