Pcornel
Networking · IP Services › NAT

PAT (Port Address Translation)

Cheat sheet · https://pcornel.dk/topic.php?topic=660

Back to the Topic

Answer

Port Address Translation (PAT), or NAT overload, allows many inside flows to share one or more inside-global IPv4 addresses by tracking transport ports or protocol identifiers in the translation state.

Remember

  • overload enables multiplexing rather than requiring one global address per active inside host
  • Interface overload commonly uses the current address of the selected outside interface
  • Pool overload can spread PAT across multiple inside-global addresses
  • Translation state is flow/protocol specific; two clients can reach the same server because their translated source ports/identifiers differ
  • A visible PAT entry proves translation for that flow, not that the remote service replied or that return traffic reaches the translating router.

First checks

  • show ip nat translations — inside local/global and outside addresses (and ports for PAT).
  • show ip nat statistics — inside/outside interfaces, hits, misses and pool use.
  • show running-config | include ip nat — rules, pools and ACL references.
  • show access-lists <nat-acl> — which inside addresses match.
  • debug ip nat — translations as they happen (briefly, with an ACL).

Commands

ip nat inside source list <acl> interface <interface> overload
Translate inside sources matched by the ACL to the interface address using ports (PAT).
ip nat inside source list <acl> pool <pool> overload
Translate inside sources to a pool using port overloading.
ip nat settings nonpatdrop
ip nat inside source static
show ip nat statistics

Verify in this order

inside flow matches the ACL → source address and port rewritten to the shared global address → unique port tracks the flow → reply port maps back to the inside host

Where it usually breaks

local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result

PAT tuple example

StageSourceDestination
Inside before NAT10.10.10.10:51514198.51.100.20:443
Outside after PAT203.0.113.5:40001198.51.100.20:443
Reply before reverse NAT198.51.100.20:443203.0.113.5:40001
Reply after reverse NAT198.51.100.20:44310.10.10.10:51514

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=660

Confirmation

Confirm action

Continue?