Network Address Translation (NAT)
The need for NAT
- 1990s addresses were depleting due to rapid adoption of the internet
- IP was more popular than they tough and they were running out of IP space
- IPv6 was being developed, address translation was meant as a temporary solution
- Every digit that we add gives us billions more of possible IPs
- RFC 1918 addresses internally
- 192.168..
- 10.0.0..
- Everybody can use these kind of networks internally
- On your private network you have tons of space but when you want to talk to the rest of the world we are going to translate your private address to a public address
- Globally unique addresses will be shared by internal users
RFC 1918 Private Addresses
- No registration required
- Internal use
- Not routable on pubic Internet
- 10.0.0.0 /8
- 172.16.0.0 - 172.31.255.255 /12
- Think about store prices ($31.99), because 32 is the next network
- 192.168.0.0 /16
IP Masquerade (NAT)
- Internal hosts "borrow" a public IP
- Hosts presents itself as this public IP during its session
- IP returned to pool after use
- with NAT we have to have a 1-to-1 ratio, one IP per device.
IP Multiplexing or Port Address Translation (PAT)
- What we do nowadays
- 1 real-world address shared by many tenants
- A single IP is shared across thousands of simultaneous sessions
- Each session requires a unique port number
- Sessions are tracked and maintained inside a table