When two laptops on the same office Wi-Fi open the same website, the website may see both connections coming from one public IPv4 address. The gateway can still deliver each reply to the right laptop. That is Port Address Translation (PAT), a common form of Network Address Translation (NAT).
What is NAT?
NAT changes an IP address as traffic crosses a router or firewall. Source NAT (SNAT) changes the source address, commonly for outbound traffic. Destination NAT (DNAT) changes the destination address, commonly when traffic to a public address must reach an internal service. A NAT rule can also translate ports, depending on its type and configuration.
What is PAT?
PAT lets multiple private hosts share a public IPv4 address by using transport-layer ports to distinguish sessions. A gateway can preserve the original source port when possible or assign a different one when needed. Cisco calls this NAT overload, and RFC 3022 calls it Network Address Port Translation (NAPT).
NAT vs PAT at a glance
Static address-only NAT uses a fixed address mapping, often one private address to one public address. Dynamic address-only NAT allocates addresses from a pool as needed. PAT can support many simultaneous sessions on a single public address by tracking ports alongside addresses and protocol. PAT is a type of NAT, so when someone says “NAT vs PAT,” they are usually comparing address-only translation with address-and-port translation.
A packet walkthrough
Imagine laptop A at 192.168.10.21 and laptop B at 192.168.10.22. Both use TCP source port 51000 to connect to the same web server at 203.0.113.80:443. The gateway has the example public address 198.51.100.10.
The gateway might translate laptop A to 198.51.100.10:51000 and laptop B to 198.51.100.10:51001. The destination stays 203.0.113.80:443 for both connections. When a reply reaches 198.51.100.10:51001, the gateway looks up its translation and forwards it to 192.168.10.22:51000. The addresses ending in 100.10 and 113.80 are from ranges reserved for documentation.
How two laptops share one public IP
Laptop A ·
192.168.10.21:51000Laptop B ·
192.168.10.22:51000Laptop A →
198.51.100.10:51000Laptop B →
198.51.100.10:51001Both sessions reach
203.0.113.80:443How is PAT different from port forwarding?
Outbound PAT creates a mapping when a client starts a connection. Port forwarding uses a configured destination mapping for inbound traffic. For example, a firewall can translate TCP traffic arriving at 198.51.100.10:8443 to 192.168.10.50:443. Whether it forwards that traffic depends on the firewall policy and routing. Address translation and access control serve separate purposes.
Outbound PAT and inbound port forwarding
Private client → Firewall → Internet
The firewall translates the source address and may change the source port.
Internet client → Firewall → Internal server
The firewall translates the destination address and can change the destination port.
What should you check when a connection fails?
Start by recording the client IP, destination IP, protocol, and destination port. In the firewall’s logs or session table, compare the original and translated source and destination. Confirm the matching policy and egress interface, then check that replies return through the device or firewall cluster that owns the translation. If failures occur mainly during traffic peaks, check session limits and NAT port utilization before changing rules.
Does every device need its own public IPv4 address?
With outbound PAT, many devices can share one public address or a pool. A static mapping may make sense for a service that needs a stable public endpoint. The right choice depends on traffic direction, session volume, and which services should be reachable.
Further reading: RFC 3022 on traditional NAT and NAPT.