Blog / How the internet works /
NAT: how many devices share one address
Count the devices connected to your Wi-Fi right now: phones, laptops, a TV, maybe a smart speaker, a console, someone’s tablet. Now guess how many public internet addresses your home has. For most people the answer is one. Sometimes less than one, which sounds impossible and is a real thing. The trick that makes it work is NAT.
What NAT is
NAT stands for Network Address Translation. Your router has one public IP address, handed out by your internet provider. Inside the house, every device gets a private address that only makes sense locally. The router translates between the two worlds.
Imagine an office with one phone number and a receptionist. Everyone inside has an extension. When someone inside calls out, the receptionist places the call from the main number and remembers who asked. When the answer comes back, the receptionist knows which desk it belongs to. Outside, the world sees one number. Inside, there are dozens of people.
How it works, step by step
- Your phone, at 192.168.1.23 inside the house, asks for a web page.
- The router replaces the phone’s private address with its own public one, and notes the conversation in a table, using a port number to tell conversations apart.
- The website replies to the public address and port.
- The router checks its table, sees which device that conversation belongs to, and passes the reply on.
The table is what lets many devices use one address at the same time. It’s why this version is sometimes called port address translation.
Private address ranges
Some address ranges are set aside for private use and never routed on the public internet. The common ones start with 192.168, 10 or 172.16 through 172.31. When you look up your phone’s Wi-Fi address and see 192.168.something, that’s a private one. Your home and your neighbour’s can both use 192.168.1.x without any clash, because they never meet.
Why NAT exists
The older address system, IPv4, has about 4.3 billion addresses in total. That sounded like plenty in the 1980s. It isn’t enough for billions of people with several devices each. NAT stretched the supply by letting a whole household or office share one.
The long-term fix is IPv6, which has a vastly larger number of addresses. It’s growing, and some networks already use it widely, but IPv4 and NAT are still everywhere.
The side effects, good and bad
The good: a bit of accidental protection. Because the router only lets in replies to conversations that someone inside started, random traffic from outside is dropped by default. NAT isn’t a proper firewall, but the effect is similar for simple cases.
The bad: it breaks incoming connections. If something outside wants to reach a device inside, like a friend joining your game or you reaching a camera, the router doesn’t know where to send it. That’s why people need port forwarding, and why peer-to-peer apps use workarounds.
The messy: games and calls. Consoles often report your “NAT type” as open, moderate or strict. Strict means it’s harder for other players to connect to you directly, so matchmaking can be limited. Video-call apps work around NAT with relay servers, which can add delay. For why that matters, see why ping matters for games and calls.
CGNAT: when your provider does it too
Here’s the part that surprises people. Many internet providers, particularly mobile networks, run NAT on their side as well, so that many customers share a single public address. This is called carrier-grade NAT, or CGNAT.
You can tell if you’re behind it: compare the “WAN” or “Internet” address shown in your router’s settings with the public address a “what is my IP” website reports. If they differ, there’s another layer of translation between you and the internet. Some providers also give addresses from a special shared range that begins with 100.64 to 100.127.
On a phone using mobile data, you are very likely behind CGNAT.
Consequences of CGNAT:
- Port forwarding doesn’t work, because you don’t control the device that sees the public address.
- Hosting anything from home is impractical without a tunnel or VPN service.
- You share an address with strangers. One of them behaving badly can get that address blocked or put in a CAPTCHA queue, so you sometimes see more “are you a robot?” checks than seem fair.
- Location lookups are rough. Websites guess your location from the address, and shared addresses can place you in the wrong city.
Some providers will give you a dedicated public address on request, often for a fee. If you really need one, ask.
Why a web admin should care
Three practical cases.
Allow-lists. Plenty of admin tools, hosts and firewalls let you restrict access to specific IP addresses. That’s a good security measure on a stable office connection. It’s frustrating when your address changes or is shared with others on a mobile network. Know which sort you have before you rely on it.
Logs and analytics. Many visitors can appear to come from one address, such as an office, a university or a mobile carrier. Counting “unique IPs” overstates how few people there are. That’s one reason to treat IP-based numbers with caution.
Blocking. If you block an address after a brute-force attempt, you may block everyone sharing it. See brute-force attacks on login pages for how to do this with less collateral damage.
Key takeaways
- NAT lets many private devices share one public IP address by keeping a translation table in the router.
- It exists because IPv4 ran short of addresses.
- It blocks unsolicited incoming traffic by default, which helps safety and hurts hosting and gaming.
- Mobile and some home providers add a second layer, called CGNAT.
- For admins, shared addresses complicate allow-lists, logs and blocking.
Related reading
- Port forwarding explained, and why to be careful
- Internet exchange points: where networks meet
- What actually happens when you type a web address
Compare the WAN address in your router with what a “what is my IP” site shows. Do they match?