126.96.36.199:21 188.8.131.52:4000 192.168.50.11:8931
184.108.40.206:80 220.127.116.11:3300 192.168.50.11:2298
18.104.22.168:80 22.214.171.124:3000 192.168.50.10:1202
NAT is one of the most important features of a home/SOHO router. Because there is only a single public IP address, all hosts share that one address and do port address translation (PAT) (or network address port translation, NAPT) to make all of the network connections unambiguous. This conserves IP addresses and also provides good security for the premises systems.
Consider the example in the slide. There are two local hosts (with the private addresses 192.168.50.10 and 192.168.50.11) that share the public address 126.96.36.199. These hosts will make a connection to the FTP and Web servers on the Internet, as shown.
- Host 192.168.50.10 connects to the Web server (destination port 80) at 188.8.131.52. In the packet that is generated, the source port is chosen to be 1202. When this packet gets to the router providing NAT, the router changes the packet's source address to 184.108.40.206 and the source port to 3000.
- Host 192.168.50.11 now connects to the Web server at 220.127.116.11, using a source port number of 2298. When this packet gets to the NAT router, a new table entry is made and the router changes the packet's source address to the shared public address 18.104.22.168 and the source port becomes 3300.
- Host 192.168.50.11 now connects to the FTP server (destination port 21) at 22.214.171.124, using a source port number of 8931. When this packet gets to the NAT router, the packet's source address is again 126.96.36.199 and the source port becomes 4000.
The point of this slide, of course, is to show how the three connections between the two local client systems and two servers can be accomplished even when using a single IP address. Use of port address translation essentially extends the size of the address space. And conceptually, this is the way in which a single host would distinguish between three Internet connections to multiple destinations.