This material was developed with funding
from the National Science Foundation
This work is licensed with a
Creative Commons Attribution 4.0 International LicenseEndFragment
Network Address Translation/
Port Address Translation
IPv4 is a 32-bit address space that supports a total of four billion addresses worldwide. With the proliferation of devices that can connect to the Internet, there was a growing need to exceed the 4-billion address capacity. In 2002, the Internet Engineering Task Force (EITF) proposed a solution—network address translation (NAT).
NAT uses two types of IPv4 addresses: public and private. To create private IP addresses, the IETF proposed the implementation of RFC 2663 establishing three PRIVATE pools of IPv4 addresses. These private IP addresses are only used inside a private network such as a home or office since they are not allowed on the Internet. This means that private IP addresses can be reused by any private network whereas a public IP address can be used only once.
All devices on the Internet must use a public IP address that falls into the traditional Class A, B, or C range.
My computer needs the latest security updates The latest episode for my streaming show is available.
Isaac only has one Internet connection and one public IP address assigned by his ISP. NAT allows devices with a private IP address to communicate outside the private network. Multiple devices can access the same Internet connection at the same time.
Device sends request to router for remote server
Outside Public Address 22.214.171.124
Default Gateway Address
When the device needs access to a network, it sends a request to the router. The router converts the private address to the public one. The private network has only one public address assigned by the ISP, so the router also adds a unique port number and saves this information to its NAT forwarding table.
Click to continue
Router checks NAT translation table
Used in the local area network side of the network.
Public IP Addresses are:
Provided by the ISP and used in the wide area network side of the network
Helps to conserve the IP address space
Allows mutliple numbers of private addresses to access one Internet connection
Advantages of Using NAT
Able to be reused on different LANs
Required to access the Internet
Hides the real IP address of an internal network devices from the public network
and acts as a firewall
Unique and cannot be reused on any network
Private IP Addresses are:
Each device within Isaac’s private network recieves a private IP address, and the devices can communicate with each other using these addresses. But what happens when one of these devices needs to communicate outside the private network? Remember, private IP addresses are not pemitted on the Internet.
Isaac has a home network with a wireless router. His Internet Service Provider (ISP) provides a public IP address for the router’s outside interface.Isaac is responsible for configuring his home network. First he assigns the router (the default gateway) a private address to its inside interface. Next he creates an IP address pool with a range of addresses that the router uses to automatically assign a private address to each device that requests one. Finally, he enables NAT on his router.
The remote server sends back the reply. The router checks the NAT translation table to send the data to the requesting device.
Device sends a second request for a different remote server
When multiple requests come from one device, which content needs to be displayed on which page? NAT was enough to handle a single request, but what about multiple requests? Enter Port Address Translation (PAT). With PAT, the port is also noted. The tablet has only one IP address with multiple browsing sessions. The router tracks which packets are for each request.
Router checks translation table
The remote server sends back the reply. The router checks the translation table to send the data to the proper application on the requesting device.