Port Address Translation Explained with Examples.

By | December 1, 2023

What is NAT Overload or Port Address Translation PAT.

NAT overload sometimes called PAT (Port Address Translation) maps multiple unregistered or private IP addresses to a single registered or public IP address by using different ports. This is what most home broadband routers do. Your ISP assigns an IP address to your router, but you find out that all the computers in the house can connect to the Internet simultaneously.

PAT uses unique source port numbers from inside global IP addresses to distinguish between translations.

When a client logs on the Internet, the NAT router assigns a port number to its source address. NAT overload or PAT ensures that clients use a different TCP port number for each client session with a server on the Internet. When the server responds, the client router routes the packet based on the source port number, which becomes the destination port number. This process also validates that the incoming packets were requested, thus adding a degree of security to the session.

83% discount on VPN
NAT overoad or PAT2

Looking at the figure above, NAT overload or PAT used unique source port numbers on the inside global IP address to distinguish between translations. As NAT processes each packet, it uses a port number to identify the packet source – 2333 and 1555 in the above figure -.

* The source address (SA) is the inside local IP address with the assigned port number attached.

* The destination address (DA) is the outside local IP address with the service port number attached, in this case, port 80: HTTP (Internet).

At the border gateway router (R1), NAT overload changes the SA to the inside global IP address of the client, again with the port number attached. The DA is the same address but is now referred to as the outside global IP address. When the web server replies, the same path is followed but in reverse.

Detailed Operation:


PAT operates at the network layer (Layer 3) of the OSI model and takes part in the modification of both the IP address and the TCP/UDP port number of the IP packets as they pass through a routing device, typically a firewall or router.

Here’s how PAT works in more detail:

IP Address Conservation: PAT enables multiple hosts on a private network to share a single public IP address. It’s particularly useful in environments where public IP addresses are scarce or expensive.

Port Number Modification: When a packet leaves the network, the router modifies the source IP address to its own public IP address. It also changes the source port number to a unique value, keeping a record in a translation table. This way, multiple internal hosts can use the same public IP address but with different port numbers.

Inbound Traffic Handling: Incoming packets are directed to the appropriate internal host based on the port number indicated in the translation table. The router translates the public IP address and port number back to the original private IP address and port number.

Enhanced Security: By hiding internal IP addresses, PAT adds a layer of security, making it more difficult for attackers to directly access internal network devices.

Application in Home and Small Office Networks: PAT is commonly used in home routers and small office environments, allowing multiple devices to access the internet using a single IP address assigned by the Internet Service Provider (ISP).

IP Addressing

IP Addressing Subnetting VLSM Subnetting Class B Address