| Line 1: |
Line 1: |
| | '''Network Address Translation''' (NAT) is the process of mapping multiple private IP addresses to a lesser number of public ones. Typically, this is used in such a way that a collection of devices on a [[Local area network|private network]] are connected to the Internet under a single IP address.<ref>https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html</ref> This process was designed largely to slow the depletion of IPv4 addresses which could be publicly registered.<ref>http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref>https://whatismyipaddress.com/nat</ref> | | '''Network Address Translation''' (NAT) is the process of mapping multiple private IP addresses to a lesser number of public ones. Typically, this is used in such a way that a collection of devices on a [[Local area network|private network]] are connected to the Internet under a single IP address.<ref>https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html</ref> This process was designed largely to slow the depletion of IPv4 addresses which could be publicly registered.<ref>http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref>https://whatismyipaddress.com/nat</ref> |
| | + | |
| | + | ==Process== |
| | + | The typical process of using network address translation goes as follows: |
| | + | # Multiple network devices (including computers, smartphones, and [[Internet of things|IoT]] devices) are connected to a local area network |
| | + | # Each device is assigned its own internal IP address from one of the unregistered IP blocks, such as <code>10.x.x.x</code> or <code>192.168.x.x</code>, by the local DHCP server. A DHCP server is typically integrated into consumer routers. |
| | + | # The router also requests a public IP address from the external network's DHCP server. |
| | + | # When an internal device attempts to access the external network (usually the Internet), the router sends out that internal device's request on its behalf. That outgoing request is sent with a specific port number which is remembered by the router. |
| | + | # When a response is sent back to the router, the port number is read, and it is forwarded to the device which made the request, using that device's internal IP address. |
| | + | # The internal device can continue this exchange for as long as is needed. The remote server keeps sending its messages to the router's IP and the port number assigned to the internal device. The internal device keeps sending its messages to the router. |
| | + | # When another device also initiates a connection to the Internet, its requests are also sent to the router, which passes on those requests to the remote server using this device's unique port number. This exchange with the router is easily differentiated from the other exchange using port numbers, and delivered to the requesting devices. |
| | + | # When unsolicited traffic comes to the router (a regular occurrence on the Internet), a NAT system alone will attempt to remap this traffic based on the port number is used. If no such port number is in use, it will either drop the packet (ignore it), or reply with an error code stating that the requested device could not be found. However most networks, including most of those behind cheap consumer routers, typically have a [[firewall]] which blocks this kind of traffic, when an internal device did not first contact that external device. |
| | | | |
| | ==References== | | ==References== |