NEWPractise supported commands in browser simulations, alongside the lesson.Try a browser practice exercise.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
Preview · 30 min
Master Network Address Translation (NAT) and PAT. Learn how thousands of private devices share a single public IP, how NAT acts as an implicit firewall, and the security risks of UPnP.
Public IPv4 addresses ran out years ago, and private addresses (RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routed on the public internet. Yet a home with one public IP can have a laptop, a phone and a TV online at the same time.
The answer is NAT (Network Address Translation): many private devices share one (or a few) public addresses.
NAT runs on the edge router or firewall. When a packet leaves the private network, the router rewrites the source IP from the private address to its public address. When the reply comes back to the public address, the router rewrites the destination back to the private address and forwards it inside. It remembers each mapping in a NAT translation table.
Create a free account to unlock the rest of this task, complete tasks, and earn Rep.
Sign in