Used by billions, understood by very few
You might have heard of something called an IP Address, – if you haven’t, start off by reading our article explaining the concept – but for this article on NAT (Network Address Translation) you need to know that IP addresses are limited. You also can’t have two devices on a network with the same IP address.
The problem is that different networks, such as your home network and computers on the internet as a whole, will inevitably have the same IP addresses or have incompatibilities in how their network addresses are set up. NAT solved both the problem of IP address scarcity and incompatible networks that need to talk to each other.
Most of the time it’s not something you need to worry about, but sometimes your internet woes are a result of NAT going wrong. So having a basic understanding of what NAT is and how it works can help solve the issue.
Where Does NAT Happen?
In the case of regular users like us, NAT is a job handled by your router. The router has an IP address assigned to it by your service provider. That’s the address that the rest of the internet sees. Every device on your home network is assigned a private IP address, which is what they’ll use to talk to each other.
When a device on your network wants to communicate with the outside world, the router stands in for it. The router has a public IP address, which everyone else sees. It keeps track of which private IP addresses requested what traffic and makes sure the data packets are routed to the right device.
Private Vs Public IP Addresses
Before we get into the types of NAT you’ll encounter, it’s a good idea to quickly discuss private and public IP addresses.
By convention, certain ranges of IP addresses are reserved for specific purposes. Public IP addresses are reserved for the internet-facing devices such as your router or web servers. Your ISP allocates a public IP address to your router and that’s the address that all outsiders on the web see. Typically a private internet address is something like 192.168.0.X or 10.1.1.X, but this varies from one router to the next. While private addresses have to be unique within a private network, they are almost certainly the same between private networks.
A public IP address, as mentioned above, is the one seen by everyone else on the internet. When you visit a website, your browser is connected to its public IP address. Typically, home routers don’t allow direct access through its public IP address that wasn’t initiated by it. This means you can’t just type in the public address of your friend’s router and have access to devices on their network.
However, some web services and devices, such as video game consoles, need a more lenient approach. This is where various NAT types come into play. Often problems arise from your connection’s NAT type being wrong for the type of service you’re trying to use. We’ll cover NAT types in more detail next.
NAT Types
While the basic idea of what NAT is isn’t too complicated, in practice there’s a lot of nuance to how it actually works. There are various types of NAT that are appropriate for different translation needs.
Static NAT
The static style of NAT maps one specific private IP address to a specific public IP address. With static NAT it’s possible to access the device mapped to the public address directly.
This is the type of NAT used for web servers that are also part of a private network. When accessing the server through this static map, you can’t also access the other devices on its private network. The server itself, however, can talk to the devices on its private network with no issue.
Dynamic NAT
Dynamic NAT is used when you have a pool of public IP addresses that you want to dynamically assign to the devices on your private network.
This is not used for web server access from outside the network. Instead, when a device on the private network wants to access the internet or another resource not on the private network, it is assigned one of the public IP addresses in the pool.
NAT Overload (PAT)
With elements of both static and dynamic NAT, the NAT overload style is the most common form and is what most home routers use. It’s known as NAT with Port Address Translation (PAT) among other names.
In most cases, your router has one public IP address assigned to it, yet all the devices on your network probably want internet access. Using NAT overload the router sets up a connection between its public IP address and that of the server. It then sends the packets to the server, but also assigns a return destination port.
This helps it know which packets are meant for which IP address on your private network. That’s the PAT part of the process, incidentally.
Proprietary NAT Types
To muddle things even more, some companies have decided to slap their own NAT classifications on things. This is mostly applicable to game consoles and you’ll find that when you do a network test, it will tell you that you’re using something like NAT Type 2 or NAT Type D.
These classifications are specific to the console or device makers and you should check their official documentation to figure out what each classification actually means.
Common Fixes for NAT Issues
Most of the time, for most people, NAT works perfectly and with complete transparency. Sometimes however, it malfunctions or gets in the way.
Once again, game consoles are most likely to run into issues, because some of their services need your network to accept access requests to your public IP address from outside, since standard NAT configurations usually don’t allow this. The good news is that there are a few common fixes you can try to make NAT less restrictive and allow incoming connections.
First, access your router (according to its manual) and check if UPnP (universal plug and play) is switched on. This feature allows applications on your local network to automatically forward ports without you needing to mess around with network settings. Just be advised that any malicious software on your network, such as malware, can also make use of UPnP. Make sure your devices are all scanned and cleared if you use this function.
You also have the option of doing manual port forwarding, so that devices that need a less strict connection can get it on a case-by-case basis.
It’s Only NATural
That’s all you need to know about what NAT is to get you started. The real nuts and bolts of how NAT works can get complicated quickly, but as long as you understand what NAT does at a high level and why it sometimes goes wrong, you’ll also understand why certain fixes work or won’t when you run into network issues.