Markdown

PAT

PAT is the Acronym for Port Address Translation

Port address translation lets many private hosts share one public address. The router rewrites each flow so that the outside sees the public address, and it tells the flows apart by the port number it assigned.

The rewrite is a form of Network Address Translation (NAT). Address translation can map one private host to one public address. Port translation maps many private hosts to a single public address by using a different port for each flow.

How the Router Keeps Flows Apart

  • Outbound. The router replaces the private source address with the public address and records the port it used.
  • The table. The private host, the private port, the public port, and the destination are stored together.
  • The reply. A packet that returns to that public port is rewritten back to the private host that opened the flow.

Many Hosts on One Address and One Host per Address

ComparedMany Hosts, One AddressOne Host per Address
Public addresses usedOne, sharedOne for each private host
How replies find the hostBy the public port recorded for the flowBy the public address alone
A new flowNeeds a free public portNeeds a free public address