Port address translation. The big question is how does the nat device know which internal system to send the response to when data is returned from the internet?
This is an important question because all of the packets will be returned to whatever the public address is on the nat device. This is where port address translation (pat) comes in. If you look at figure 4-17, you will see that the nat device using port addressing is keeping track of not only the ip address of the system sending outbound traffic, but also the port used by the application on the private system. the source address of the outbound packet is converted from the ip address of the private system to the ip address of the public interface on the nat device. Also, the port used by the application on the sending computer is then converted to a unique port address used by the nat device. All IP addresses and port addresses are then stored in the nat table, known as the port address table, and then the packet is sent to destination system on the internet. When a response comes back from the internet destined for a port on the nat device, the packet is then translated to use the original private IP address and port number of the original source system. After the header of the packet is replaced with original ip and port information, the nat device then sends the data to the internal system.