Introduction to NAT (Network Address Translation)
NAT translates private IP addresses to public IP addresses, allowing devices on a local network to access the internet while conserving public IPv4 space.
Why Do We Need NAT?
With the exhaustion of IPv4 addresses, private IP addresses (RFC 1918) were introduced. However, private IPs are not routable on the internet. NAT bridges this gap.
NAT Terminology
- **Inside Local**: The private IP of a device on the internal network. - **Inside Global**: The public IP representing the internal device to the outside world. - **Outside Local**: How the outside host appears to the internal network. - **Outside Global**: The actual public IP of the outside host.
Types of NAT
The three main types of NAT are Static NAT (1-to-1), Dynamic NAT (many-to-many pool), and Port Address Translation (PAT, many-to-1).
❓ Frequently Asked Questions
What is RFC 1918?
RFC 1918 defines private IP address spaces: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
Is NAT used in IPv6?
Generally no, as IPv6 has a massive address space eliminating the need for NAT to conserve addresses.
Which interface is usually NAT inside?
The router interface connected to the private, internal network is designated as `ip nat inside`.