NAT and PAT
Updated Jan 16, 2019 ·
Network Address Translation (NAT)
Network Address Translation (NAT) translates private IP addresses to a public IP address, allowing multiple devices on a local network to access the internet using a single public IP.
- Conserves public IP addresses.
- Hides internal network structure.
- Provides a basic level of security.
- Enables internal IP address management.
- Supports dynamic and static NAT configurations.
Sample diagram:
Port Address Translation (PAT)
Port Address Translation (PAT), a subset of NAT, maps multiple private IP addresses to a single public IP address using different ports, allowing multiple devices to share one public IP address simultaneously.
- Can be a hardware or software configuration.
- Normally enabled on the router, PAT hides the internal IPs.
- Enables multiple connections from different devices.
- Uses port numbers to differentiate traffic.
- Supports large-scale networks with limited public IPs.
- Often referred to as "NAT overload", or "NAT Gateway"
Almost similar to a forward proxy, but their differences are:
- PAT is Layer 4, while Forward Proxy is Layer 7 of the OSI Model.
- Forward proxy can cache the retrieved content from the internet, PAT doesn't.
- Forward proxy can force users to authenticate before fetching requests.
Sample diagram: