Slide 25 of 27
Notes:
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 220.16.16.5. 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 98.10.10.5. 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 220.16.16.5 and the source port to 3000.
- Host 192.168.50.11 now connects to the Web server at 98.10.10.5, 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 220.16.16.5 and the source port becomes 3300.
- Host 192.168.50.11 now connects to the FTP server (destination port 21) at 99.12.18.6, using a source port number of 8931. When this packet gets to the NAT router, the packet's source address is again 220.16.16.5 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.