intermediate v1 • Updated 7 hours ago

NAT (Network Address Translation) & PAT

NAT modifies network address information in IP packet headers while in transit across a traffic routing device to enable private IP networks to communicate over public networks.

Remember This Key Rule

PAT (NAT Overload) allows hundreds of private hosts to share 1 single public IP by tracking source port numbers.

In Simple Terms

Because the world ran out of IPv4 public addresses, your home and office networks use private IP addresses (like 192.168.1.x) that cannot route on the Internet. NAT/PAT (Port Address Translation / NAT Overload) translates thousands of private internal IP addresses into a single shared public IP address using unique TCP/UDP port numbers.

Visual Diagram & Flow

Inside Local
192.168.1.5:5000
NAT Router
Maps: 5000->25000
Inside Global
203.0.113.1:25000
Why It Matters in Real Networks

NAT is the primary reason the IPv4 Internet survived for the last 25 years without collapsing under address exhaustion.

How It Works (Technical Breakdown)

- **Static NAT**: One-to-one permanent mapping of private IP to public IP (often used for public web servers). - **Dynamic NAT**: Many-to-many temporary mapping from a pool of public IPs. - **PAT (NAT Overload)**: Many-to-one mapping. Uses unique source port numbers (e.g. `192.168.1.10:50001` -> `203.0.113.5:10001`). - **Translation Table**: Router keeps a state table mapping `Inside Local -> Inside Global -> Outside Global -> Outside Local`.
Real-World Analogy

An office building with 500 employees but only one main street address and phone number. When someone calls out, the receptionist records their 4-digit extension so return calls reach the right desk.

Concrete Example

PC1 (`192.168.1.15:52100`) sends traffic to web server (`93.184.216.34:80`). Gateway router rewrites the packet source to `203.0.113.10:60001` and forwards it to the Internet.

Common Engineering Mistakes & Pitfalls

Believing NAT is a complete security firewall. NAT hides internal IPs as a byproduct of translation, but stateful inspection and ACLs are required for true security.

Next & Related Concepts

Explore the complete curriculum roadmap.

Concept Mastery Quiz

Test your comprehension with active-recall questions.

No quiz questions generated for this topic yet.

Active Recall Flashcards

Click each flashcard to reveal the answer and test your memory.

No flashcards created for this topic yet.

Content Versioning

Audit trail of revisions and updates for this knowledge topic.

Version Change Summary Author Timestamp
v1 (Current) Active production content system Sun, Aug 23, 2026 11:09 AM
Searching...
No matching topics found for "".
Type at least 2 characters to search across all topics, protocols, and scenarios.
Navigate with mouse or click ESC to close