Port Address Translation (PAT) Explained

Going Further Than Dynamic NAT

Dynamic NAT still needs roughly one public address per simultaneously active device. PAT (Port Address Translation) - also commonly called "NAT overload" - lets an entire network share just one single public IP address, no matter how many devices are connected.

The Trick: Using Port Numbers to Tell Connections Apart

Since every device shares the same public IP address, PAT distinguishes between different devices' connections by assigning each one a unique combination of that shared public address plus a distinct port number.

Internal device            Translated to (shared public IP + unique port)
192.168.1.10:5000    -->   203.0.113.5:40001
192.168.1.11:5000    -->   203.0.113.5:40002
192.168.1.12:5000    -->   203.0.113.5:40003

All three internal devices might use the exact same internal port number, but PAT assigns each one a different external port on the shared public address - which is exactly what lets the router correctly route each reply back to the right internal device.

The Router Keeps a Translation Table

The NAT router maintains a table mapping each of these translations, so when a reply comes back addressed to 203.0.113.5:40002, the router knows to forward it specifically to 192.168.1.11:5000 - not to any of the other internal devices.

Why PAT Is the Standard for Home and Office Routers

PAT is by far the most address-efficient NAT variant - an entire household or office, potentially dozens of devices, can share one single public IP address simultaneously. This is exactly why most home internet connections only come with one public IP address, yet every device in the house can still access the internet at the same time.

Written by Lorens Mishra

Software Engineer Notes Management System Administrator

Discussion

0 comments
Sign in to join the discussion.

No comments yet. Be the first to say something.