In NAT terminology, the inside network is the set of networks that is subject to translation. The outside network refers to all other networks.
When using NAT, IPv4 addresses have different designations based on whether they are on the private network, or on the public network (Internet), and whether the traffic is incoming or outgoing.
NAT includes four types of addresses:
- Inside local address
- Inside global address
- Outside local address
- Outside global address
When determining which type of address is used, it is important to remember that NAT terminology is always applied from the perspective of the device with the translated address:
- Inside address – The address of the device which is being translated by NAT.
- Outside address – The address of the destination device.
NAT also uses the concept of local or global with respect to addresses:
- Local address – A local address is any address that appears on the inside portion of the network.
- Global address – A global address is any address that appears on the outside portion of the network.
In the figure, PC1 has an inside local address of 192.168.10.10. From the perspective of PC1, the web server has an outside address of 126.96.36.199. When packets are sent from PC1 to the global address of the web server, the inside local address of PC1 is translated to 188.8.131.52 (inside global address). The address of the outside device is not typically translated, because that address is usually a public IPv4 address.
Notice that PC1 has different local and global addresses, whereas the web server has the same public IPv4 address for both. From the perspective of the web server, traffic originating from PC1 appears to have come from 184.108.40.206, the inside global address.
The NAT router, R2 in the figure, is the demarcation point between the inside and outside networks and as between local and global addresses.
The terms, inside and outside, are combined with the terms local and global to refer to specific addresses. In the figure, router R2 has been configured to provide NAT. It has a pool of public addresses to assign to inside hosts.
- Inside local address – The address of the source as seen from inside the network. In the figure, the IPv4 address 192.168.10.10 is assigned to PC1. This is the inside local address of PC1.
- Inside global address – The address of source as seen from the outside network. In the figure, when traffic from PC1 is sent to the web server at 220.127.116.11, R2 translates the inside local address to an inside global address. In this case, R2 changes the IPv4 source address from 192.168.10.10 to 18.104.22.168. In NAT terminology, the inside local address of 192.168.10.10 is translated to the inside global address of 22.214.171.124.
- Outside global address – The address of the destination as seen from the outside network. It is a globally routable IPv4 address assigned to a host on the Internet. For example, the web server is reachable at IPv4 address 126.96.36.199. Most often the outside local and outside global addresses are the same.
- Outside local address – The address of the destination as seen from the inside network. In this example, PC1 sends traffic to the web server at the IPv4 address 188.8.131.52. While uncommon, this address could be different than the globally routable address of the destination.
The figure shows how traffic is addressed that is sent from an internal PC to an external web server, across the NAT-enabled router. It also shows how return traffic is initially addressed and translated.