NAT Types
Static NAT: one-to-one permanent mapping between a private IP and a public IP. Used when a specific internal device (server) must always be reachable from the internet at a fixed public IP. Every private IP requires its own dedicated public IP.
Dynamic NAT: maps private IPs to a pool of public IPs on a first-come, first-served basis. When the pool is exhausted, new connections are blocked. Unlike static NAT, mappings are temporary. Still requires one public IP per active session.
PAT (Port Address Translation) / NAT Overload: maps many private IPs to a single public IP by adding unique port numbers to differentiate sessions. This is the type of NAT used in virtually every home router and most enterprise internet connections — thousands of internal devices share one public IP. Also called 'NAT with overload' on Cisco devices.
NAT Terminology
Inside local: the private IP address of the internal device (as seen from inside the network). Inside global: the public IP address representing the internal device (as seen from the internet). Outside global: the public IP of the external destination server. Outside local: how the external destination is seen from inside the network (usually the same as outside global).
NAT translations table: the router maintains a table of all active NAT mappings. For PAT, each entry includes private IP, private port, public IP, public port, protocol, and destination. The router uses this table to correctly forward returning traffic to the originating internal host.
NAT Benefits and Limitations
Benefits: conserves public IPv4 addresses (thousands of devices share one public IP). Provides basic security by hiding internal IP structure — external hosts cannot directly initiate connections to internal devices (unless port forwarding is configured). Simplifies IP management — internal IPs can be renumbered without changing public IP.
Limitations: NAT breaks end-to-end connectivity — some applications (active FTP, SIP, IPsec in transport mode) require special NAT traversal support (ALG — Application Layer Gateway). NAT adds latency from table lookup and translation. NAT complicates network troubleshooting when inside/outside address translation obscures real IPs. IPv6 was designed to eliminate the need for NAT by providing enough address space for every device.
Port forwarding (DNAT — Destination NAT): maps a specific port on the public IP to an internal device's IP and port. Used to allow inbound connections to internal servers (e.g., port 80 → internal web server at 192.168.1.10:80).