Difference between revisions of "Network address translation"
m (refs) |
(starting on types) |
||
| 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 name="cisco nat faq">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 name="ciscopress nat">http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref name="whatosmyipaddress nat">https://whatismyipaddress.com/nat</ref> Some parts of the world are now using IPv6 instead (which offers many more addressed than IPv4), but in many countries, IPv4 is still used, but almost exclusively with network address translation. | '''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 name="cisco nat faq">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 name="ciscopress nat">http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref name="whatosmyipaddress nat">https://whatismyipaddress.com/nat</ref> Some parts of the world are now using IPv6 instead (which offers many more addressed than IPv4), but in many countries, IPv4 is still used, but almost exclusively with network address translation. | ||
| + | |||
| + | ==Types== | ||
| + | ===Dynamic NAT=== | ||
| + | Probably the most commonly used type is dynamic NAT, this creates a one-to-one relationship between the remote and local devices when and where they are requested. Typically, the router's public IP address is itself dynamically assigned, and can therefore change at any time.<ref name="dummies - types of NAT">https://www.dummies.com/programming/networking/cisco/types-of-network-address-translation/</ref> | ||
| + | |||
| + | ===Static NAT=== | ||
| + | Permanently maps an internal IP address to a public one. This is useful for allowing (often unsolicited) external traffic into a local server.<ref name="dummies - types of NAT">https://www.dummies.com/programming/networking/cisco/types-of-network-address-translation/</ref> | ||
| + | |||
| + | ===Overloading=== | ||
| + | |||
| + | ===Overlapping=== | ||
| + | |||
==Process== | ==Process== | ||
| Line 12: | Line 24: | ||
# 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. | # 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. | ||
<ref name="cisco nat faq">https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html</ref><ref name="ciscopress nat">http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref name="whatosmyipaddress nat">https://whatismyipaddress.com/nat</ref> | <ref name="cisco nat faq">https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html</ref><ref name="ciscopress nat">http://www.ciscopress.com/articles/article.asp?p=25273</ref><ref name="whatosmyipaddress nat">https://whatismyipaddress.com/nat</ref> | ||
| + | |||
==References== | ==References== | ||
{{Reflist}} | {{Reflist}} | ||
[[Category:Networking]] | [[Category:Networking]] | ||
Revision as of 02:18, May 19, 2019
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 private network are connected to the Internet under a single IP address.[1] This process was designed largely to slow the depletion of IPv4 addresses which could be publicly registered.[2][3] Some parts of the world are now using IPv6 instead (which offers many more addressed than IPv4), but in many countries, IPv4 is still used, but almost exclusively with network address translation.
Types
Dynamic NAT
Probably the most commonly used type is dynamic NAT, this creates a one-to-one relationship between the remote and local devices when and where they are requested. Typically, the router's public IP address is itself dynamically assigned, and can therefore change at any time.[4]
Static NAT
Permanently maps an internal IP address to a public one. This is useful for allowing (often unsolicited) external traffic into a local server.[4]
Overloading
Overlapping
Process
The typical process of using network address translation goes as follows:
- Multiple network devices (including computers, smartphones, and 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
10.x.x.xor192.168.x.x, 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
- ↑ 1.0 1.1 https://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html
- ↑ 2.0 2.1 http://www.ciscopress.com/articles/article.asp?p=25273
- ↑ 3.0 3.1 https://whatismyipaddress.com/nat
- ↑ 4.0 4.1 https://www.dummies.com/programming/networking/cisco/types-of-network-address-translation/