What is NAT, how does it work, and why is it used?

NAT (network address translation) is a router function that rewrites the private IP addresses of devices on your local network into a public address, so a whole home or office can reach the internet through one public IP.

This guide explains how the translation works, where it runs, the difference between private and public addresses, the NAT types routers and game consoles report, and how to fix common NAT problems.

What is NAT, how does it work, and why is it used?
The router swaps inside address 10.1.1.1 for 203.0.113.2, logs the pair in its NAT table and translates the reply back. (Image: cisco.com)

What is NAT, how does it work, and why is it used?

Cisco describes NAT as a feature designed for IP address conservation: it lets private networks that use unregistered addresses connect to the internet. The router acts as an agent between the public internet and your private network.

Question Short answer
What is NAT? Network address translation: a router swaps private (not globally unique) addresses for a legal public address before packets leave the network.
How does it work? The router records each outgoing connection in a translation table, sends it out under its own public address, and uses the table to send replies back to the right device.
Why is it used? To save public IPv4 addresses, since one public address can represent an entire group of computers.
What else does it give you? The outside world sees only one address, which hides the layout of the internal network.
Where does it run? Usually on the router between your local network and your internet provider.

How does NAT work step by step

Most home routers use the overloaded form of NAT, called PAT (port address translation). It tells devices apart by port number, so dozens of phones, PCs and consoles can share one public address at the same time.

Step What the router does Example
1. A device sends a request A laptop with private address 192.168.1.20 opens a connection to a website. Source 192.168.1.20, port 50000
2. The router translates it The router swaps the private source address for its public address and assigns a source port. Source becomes the router's public IP, port 50000 if free
3. The router records the mapping The pairing of private address and port to public address and port goes into the NAT translation table. 192.168.1.20:50000 to public IP:50000
4. The reply comes back The website answers the public address and port it saw. Destination is the router's public IP, port 50000
5. The router translates it back The router looks up the port in its table and forwards the reply to the original device. Destination becomes 192.168.1.20:50000
6. The entry times out When the session ends or goes idle, the mapping is removed from the table. The port is free for another session

If the original source port is already taken, PAT searches for the first free port in the same range and uses that instead. If no port is free, the packet is dropped. Traffic that arrives unrequested has no table entry, so the router does not know which device should get it, which is why hosting games or servers behind NAT needs port forwarding on the router.

Where does NAT happen?

NAT runs on whichever device sits between an inside network and an outside network. Cisco's terms for the two sides are NAT inside and NAT outside.

Where What it translates Typical use
Home Wi-Fi router Every phone, PC, TV and console on your home network to the single public address from your ISP Sharing one internet connection
Business router or firewall Internal office subnets to one public address or a pool of public addresses Office internet access, publishing a mail or web server
Windows 10 and Windows 11 Hyper-V Virtual machines and containers to the host PC's IP address through an internal virtual switch Giving VMs network access; one NAT network per host
Cloud networks such as Azure NAT Gateway Instances in a private subnet to a public address for outbound connections Servers that need to reach the internet without their own public IP

Cisco notes that inside-to-outside translation happens after routing, while outside-to-inside translation happens before routing.

Where NAT happens: a NAT router between the inside and outside networks
Cisco calls the private side NAT inside and the internet side NAT outside; the router translating between them sits at the edge. (Image: cisco.com)

Private vs public IP addresses

A private address only has to be unique inside your own network, so millions of homes reuse the same ranges. A public address is globally unique and routable on the internet, which is why NAT has to swap one for the other.

Range Type Where you see it
10.0.0.0/8 (10.0.0.0 to 10.255.255.255) Private, reserved in RFC 1918 Business networks, some ISP-supplied routers
172.16.0.0/12 (172.16.0.0 to 172.31.255.255) Private, reserved in RFC 1918 Office networks, virtual machine networks
192.168.0.0/16 (192.168.0.0 to 192.168.255.255) Private, reserved in RFC 1918 Most home routers, for example 192.168.1.x or 192.168.0.x
Any other assigned unicast address Public The address your ISP gives your router, and the addresses of websites

Cisco's terms map onto these: the inside local address is the private address a device gets from DHCP, and the inside global address is the public address the outside world sees for it.

Private IP addresses reused: two hosts at 10.1.1.1 behind separate NAT routers
Both hosts keep the same private 10.1.1.1 address because each NAT-enabled router translates it before traffic reaches the shared server. (Image: cisco.com)

How to tell if your PC is behind NAT

Compare the address Windows reports with the public address your router reports. If the PC's address is in a private range, your router is translating it.

  1. Press Windows key + R, type cmd and press Enter.
  2. Type ipconfig and press Enter.
  3. Find your active adapter, such as Wireless LAN adapter Wi-Fi, and read IPv4 Address and Default Gateway.
  4. If the IPv4 address starts with 10., 172.16 to 172.31, or 192.168., the PC is on a private network behind NAT.
  5. Type the Default Gateway address into a browser to open your router's admin page and sign in.
  6. Find the WAN or internet status page; if the router's WAN address is also private, a second NAT sits upstream of you.

Two layers of translation are what the Xbox reports as Double NAT detected. It is common when an ISP modem-router and your own router both run NAT.

NAT types

Routers support three ways of mapping inside addresses to outside ones, and they can be combined.

NAT type How it maps addresses Used for
Static NAT One-to-one: one private address always maps to the same public address. It can also be set per port. A server that must always be reachable at the same public address
Dynamic NAT Private addresses are matched to addresses from a pool of public addresses as needed. Organisations that own several public addresses
PAT (NAT overload) Many private addresses share one public address, told apart by port number. Almost every home router

Some applications put IP addresses inside the data itself, which plain NAT does not rewrite. Routers handle those with an application layer gateway (ALG); Cisco lists protocols such as FTP, SIP and DNS among those that NAT and its ALGs support. NAT-PT and NAT64 are related mechanisms that translate between IPv6 and IPv4.

Static NAT type giving an inside mail server a fixed public address
Static NAT maps one private address to the same public address every time, so outside devices can reach an inside server. (Image: cisco.com)

Proprietary NAT types

Game consoles grade your network by how easily other players can reach you directly. These labels are each vendor's own scale, not a networking standard, and the console shows them in its network test.

Platform Where to see it What the vendor says
Xbox Press the Xbox button, then Profile & system > Settings > General > Network settings; the NAT Type field is under Current Network Status Your NAT type needs to be Open to fix chat and multiplayer problems; also look for Double NAT detected or UPnP not successful
Nintendo Switch and Switch 2 HOME Menu > System Settings > Internet > Test Connection NAT type is graded A to F; A is best for peer-to-peer communication, and F cannot complete peer-to-peer communication
Both Run the test again after each change A stricter NAT type can block some online activities, and the other player's NAT type also affects the connection
Nintendo Switch NAT type test under System Settings Internet
On a Switch, Internet in System Settings leads to Test Connection, which grades the NAT type from A to F. (Image: en-americas-support.nintendo.com)

Common fixes for NAT issues

Work through the fixes in order and re-test the NAT type after each one. Xbox support asks for the same order: finish each step before moving to the next. On a gaming PC, you can change the NAT type on Windows with the same router settings.

Xbox NAT type is not Open, or friends cannot hear you in party chat

The router is not letting incoming game traffic reach the console.

  1. Turn on UPnP in your router's admin page to refresh the NAT table.
  2. Check whether the router's firmware needs an upgrade, and install it.
  3. If that fails, open the console's network ports with port forwarding in the router.
  4. As a later step, Xbox support lists the router's perimeter network (DMZ) feature for the console.
  5. Select Test NAT type on the console's Network screen after each change.

"Double NAT detected"

Two devices on your connection are both running NAT, usually an ISP modem-router plus your own router.

  1. Open the router admin page from your PC's Default Gateway address and check whether its WAN address is private.
  2. If it is, ask your ISP or network administrator how to remove the second layer of NAT on your connection.
  3. Re-test the NAT type on the console.

Nintendo Switch cannot match with other players online

A strict NAT type on your network or on the other player's network.

  1. Go to System Settings > Internet > Internet Settings, select your network, choose Change Settings and turn off IPv6 Connection.
  2. Power cycle the modem and router, and wait until they are fully back on.
  3. Update the router's firmware, or reset it to factory defaults with help from its manufacturer.
  4. Run Test Connection again to see whether the NAT type improved.

UPnP not successful

UPnP is switched off on the router or the router does not support it.

  1. Turn UPnP on in the router, restart the router and console, and re-test.
  2. If you prefer to keep UPnP off, forward the game's ports manually instead.

UPnP is convenient but lets devices open ports on their own; weigh why some people disable UPnP before you leave it on.

Is NAT a firewall?

No. Treat NAT as a side benefit for privacy of your network layout, not as a replacement for the router or Windows firewall. Cisco credits NAT with additional security because the whole internal network hides behind one address, and unrequested inbound traffic has no table entry to follow. But port forwarding, DMZ and UPnP deliberately open paths in, and NAT does not inspect what passes through.

Network address translation FAQ

What does NAT stand for?

NAT stands for network address translation. It is the process a router uses to rewrite private IP addresses on a local network into a public address before traffic goes out to the internet, and to reverse that for replies.

Is NAT the same as PAT?

PAT is one kind of NAT. Cisco calls it NAT overloading: many private addresses share one public address, and the router tells the sessions apart by port number. Home routers almost always use PAT.

Does every home router use NAT?

Home routers that share one IPv4 internet connection among several devices use NAT, because the ISP normally assigns only one public address. Devices on the home network get private addresses such as 192.168.x.x from the router's DHCP server.

What is the difference between static and dynamic NAT?

Static NAT maps one private address to the same public address every time, which suits servers. Dynamic NAT assigns public addresses from a pool as devices need them, so the mapping can change between sessions.

What NAT type is best for gaming?

The most open grade on your console. Xbox says your NAT type needs to be Open to fix multiplayer and chat problems. On Nintendo Switch, NAT type A is best for peer-to-peer play and F cannot complete peer-to-peer connections.

What is double NAT?

Double NAT means traffic passes through two devices that both translate addresses, such as an ISP modem-router and your own router. It can make console NAT types stricter, and Xbox reports it as Double NAT detected on its network settings screen.

How do I find my private IP address on Windows?

Open Command Prompt, type ipconfig and press Enter. The IPv4 Address line under your active adapter is your private address, and Default Gateway is your router. Addresses starting 10., 172.16 to 172.31, or 192.168. are private.

Does IPv6 need NAT?

NAT exists mainly to stretch the limited supply of IPv4 addresses. Separate translation mechanisms such as NAT-PT and NAT64 exist to let IPv6-only and IPv4-only devices talk to each other.

It’s only NATural

Leave NAT on your router as it is, and only change port forwarding, UPnP or DMZ when a game or app tells you your NAT type is too strict. NAT is what lets every device in your home share one public IPv4 address, and its defaults suit browsing and streaming; the fixes above exist for the narrow case of incoming peer-to-peer connections.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *