Skip to the article content

Behind the scenes of your home network: Understanding NAT

There’s a lot of technical wizardry behind the usually-simple act of connecting your devices to the internet via a home network.

One of the more fascinating behind-the-scenes systems is a networking protocol called Network Address Translation (NAT). 

What is NAT? 

While there are technically different types of NAT, the term is most commonly used in regards to the specific type we’ve detailed below. And there’s a very good chance your home network is utilising it.

NAT separates networks into private and public spaces.

The private space refers to your connected local devices – computers, game consoles, phones, etc. – that likely connect to a modem or router. 

The modem/router is used to connect your home (private) devices to each other in a local network, and then connects those devices to the internet (public).

Locally, every device on your home network requires a private internet protocol (IP) address to communicate with the modem/router and other devices on the same network.

Externally, your home network connection uses a single public IP address to connect to the internet. 

Understanding NAT 

An easier way to think about NAT may be as if it were a receptionist taking incoming calls from a single external phone number and directing them to the right internal phone extension.

If someone within that hypothetical business wants to make a phone call, they might get the receptionist to dial out from the company’s single external phone number and then connect the call to the person who requested it.

The phoned person would receive the company’s call from the same phone number that could be dialled to reach the business.

In this analogy, the business phone number is your home network’s public IP address (used for connecting to the internet), and the company’s internal phone extensions are your home network’s private IP addresses for various connected devices (used to connect locally).

NAT is the receptionist answering, making and redirecting calls.

The same is true when someone calls the business (your modem/router’s public IP), at which point the receptionist (NAT protocol) uses a specific device’s extension number (private IP) to forward the ‘call’. 

Why networks need NAT 

Public IP addresses have traditionally been in limited supply.

When the IPv4 protocol – the one that controls most current internet traffic – was established back in the 1980s, it was limited to just over 4-billion public IP addresses.

Given the exponential growth of the internet in recent years which, in turn, necessitated the creation of new internet connections, the NAT protocol was used to address the public IP address shortage.

Because of this shortage, the numerous NAT-controlled private IP addresses (millions across three address ranges) allow multiple local home network devices to connect the internet through a single public IP address provided by a retail service provider.

Ultimately, the newer and upgraded IPv6 protocol has been designed to complement (in the short- to mid-term) and may even potentially replace IPv4.

Given the massive number of public IP addresses available under IPv6 (340 undecillion), the NAT protocol will no longer be required if IPv4 is fully retired. For now, however, it is still very much needed. 

Benefits of NAT 

The most obvious benefit of NAT is that it removes the requirement for every device on a home network to have a public IP address, which have been in short supply thanks to the limitations of the IPv4 protocol.

Another implicit benefit is NAT security.

Local devices use private addresses on your home network and are generally hidden, unlike the public address of your internet connection.

An external IP address must be public so your devices can send and receive data from websites, email servers, streaming services, online gaming networks, etc.

Modem/routers tend to use something called Dynamic Host Configuration Protocol (DHCP) to automatically assign private IP addresses to devices that connect to your network via wi-fi or Ethernet cable.

This means connecting devices to a local network with DHCP enabled is generally straightforward and fast.

If DHCP is disabled, private IP addresses must be manually inputted on each device, based on the accepted local IP address range of the modem/router.

Drawbacks of NAT 

By keeping private devices hidden behind the NAT protocol, it can cause issues with peer-to-peer (P2P) connectivity. P2P is not as common as it once was, but there are still some uses.

P2P connects devices directly to each other, bypassing the need for a traditional peer-to-server connection, in order to make phone or video calls (VoIP), exchange files, or play online games.

Universal Plug and Play (UPnP) networking protocols on modem/routers are kind of like DHCP for the internet.

When active, the UPnP protocol dynamically opens ports to facilitate online P2P connectivity for devices on a local network.

In terms of online gaming, if a home network has multiple gaming consoles attempting to play online at the same time, UPnP is required to ensure smooth connectivity.

If UPnP is disabled, the other option for ensuring P2P connectivity when using a NAT is to manually open ports (called port forwarding) and assign them to a specific local device.

Port forwarding permanently (until disabled) leaves designated ports open, and it’s advisable to only use either UPnP or port forwarding (in that order).

Where applicable, you should also keep your modem/router firmware up to date to ensure that networking protocol features such as UPnP are functioning properly.

You might not even know you have NAT problems until you encounter connectivity issues with P2P systems, because normal usage – web browsing, sending/receiving emails, instant messaging, etc. – isn’t generally impacted.

NAT is essential given the current limitations of the IPv4 protocol, whose stopgap pros currently outweigh the potential P2P cons (which will change once IPv6 becomes more commonplace). 

Ever wondered how video streaming actually works? You can learn all about it here.

You might also like