NAT/PAT (Network Address Translation)
Master address translation techniques for IP conservation and network security
What is NAT?
Network Address Translation (NAT) is a method of mapping private IP addresses to public IP addresses, enabling communication between private networks and the public internet while conserving IPv4 addresses.
Why NAT is Essential:
- IPv4 Conservation: Extends limited IPv4 address space
- Security: Hides internal network structure
- Cost Savings: Reduces need for public IP addresses
- Flexibility: Allows network design freedom
- Isolation: Separates internal from external networks
- Migration: Easier network changes
- Aggregation: Simplifies routing tables
- Control: Centralized internet access management
How NAT Works:
1
Outbound Packet
Internal host sends packet with private IP
192.168.1.10 → 198.51.100.1
↓
2
Translation
NAT device replaces source IP with public IP
203.0.113.1 → 198.51.100.1
↓
3
Return Traffic
Response returns to public IP
198.51.100.1 → 203.0.113.1
↓
4
Reverse Translation
NAT translates back to private IP
198.51.100.1 → 192.168.1.10
📊 NAT Statistics
- IPv4 Addresses: 4.3 billion total
- Private Ranges: 18 million addresses
- NAT Usage: 99% of networks
- Port Range: 1024-65535 dynamic
Private IP Ranges (RFC 1918)
Class A
10.0.0.0/8
16.7M addresses
Class B
172.16.0.0/12
1M addresses
Class C
192.168.0.0/16
65K addresses