Blog • SHM Soft

What Is NAT? Network Address Translation Explained

NAT is the reason your whole home shares one public IP address. It translates private addresses to public ones and back again, so the internet never runs out. Here is how it works.

Published 28 November 2026 • SHM Soft

Your home probably has ten or twenty devices connected to the internet: phones, laptops, a TV, maybe a printer and a game console. But your internet provider gave you only one public IP address. How do all those devices share one address without getting each other's data? The answer is NAT.

NAT stands for Network Address Translation. It is the system that lets many devices with private addresses share a single public address. In this guide, we explain what NAT is, how it works, the different types, and why it matters for the CCNA exam.

Home router and modem with lights showing NAT translating network traffic

What Is NAT?

NAT is a process, usually done by a router, that changes the IP address in a packet as it passes through. When a device on your home network sends a packet to the internet, the router replaces the device's private source address with the router's own public address. When the reply comes back, the router changes the address back to the device's private address and delivers it. The website you visited never sees your laptop's private address. It only sees your router's public address.

To keep track of all this, the router holds a NAT translation table. Each entry records a private address and port, and the public address and port it was translated to. When a reply arrives, the router looks up the public port, finds the matching private device, and forwards the packet.

NAT exists because IPv4 ran out of addresses. There are only about 4.3 billion IPv4 addresses, and there are far more devices than that. The solution was to give most devices private addresses, which are free to reuse in every home and office, and to use NAT to share the smaller pool of public addresses. Your whole home shares one public address, and your office might share a handful. Our guide on what IPv6 is explains the long-term fix, which is to give every device its own public address again.

Private addresses and NAT

Three address ranges are set aside for private use, and they never appear on the public internet: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255. Your home network almost certainly uses 192.168.1.0 or 192.168.0.0. Your office might use 10.0.0.0. Millions of networks use the same ranges, and that is fine, because private addresses are never routed on the internet. They only have meaning inside their own network.

The router at the edge of the network is the translator. Inside, everything uses private addresses. Outside, everything uses the public address. NAT sits on the boundary and converts between the two. That boundary is also a kind of security. Devices on the internet cannot reach your laptop directly, because they do not know its private address, and the router will not forward traffic it did not expect. NAT is not a firewall, and it should not be your only security, but it does hide your internal network from the outside world.

How the translation table works

Here is a concrete example. Your laptop has the private address 192.168.1.10, and it opens a web page. It sends a packet from port 50001 to the web server. Your router receives it, picks a public port, say 60001, and records the mapping: 192.168.1.10:50001 goes to public address 203.0.113.5:60001. It rewrites the packet's source to 203.0.113.5:60001 and sends it on. The web server replies to 203.0.113.5:60001. The router looks up port 60001, finds your laptop, rewrites the destination back to 192.168.1.10:50001, and delivers it. Your laptop never knows any of this happened.

If your phone opens the same website at the same time, the router gives it a different public port, say 60002, and records a separate mapping. The replies come back to different ports, so the router can tell them apart. That is how one public address serves many devices at once, and it is why ports matter so much in NAT.

Types of NAT: Static, Dynamic, and PAT

There are three main types of NAT. Static NAT maps one private address to one public address, permanently. It is used when a device must always be reachable from the internet at the same public address, like a web server or a mail server in an office. The mapping is configured by hand and never changes.

Dynamic NAT maps private addresses to a pool of public addresses. When a device sends traffic, it borrows a public address from the pool, and when it stops, the address goes back. This was common when companies had a small pool of public addresses to share, but it has a limit: if all the public addresses are in use, the next device must wait. It also gives no guarantee that a device will get the same public address twice.

PAT, or Port Address Translation, is the type almost everyone uses, and it is what your home router does. It is also called NAT overload. Many private addresses share one public address, and the router tells them apart by port number, as in the example above. PAT is the reason a whole home or office can run on a single public address. When people say NAT, they usually mean PAT.

NAT and the CCNA Exam

NAT is a CCNA topic, and the exam expects you to know the three types, the terms, and the basic configuration. The terms are worth learning: inside local is the private address, inside global is the public address it is translated to, outside local is the address the outside device appears to have, and outside global is its real public address. These four terms show up in exam questions and in Cisco's own documentation, so they are worth memorising as a set.

The exam also tests the idea that NAT hides internal addresses, that PAT uses port numbers to share one address, and that NAT can break some protocols. A few older protocols carry IP addresses inside their data, not just in the header, and NAT does not rewrite those. Most modern protocols handle it fine, but it is a known limitation, and it is one of the reasons IPv6 was designed to remove the need for NAT.

In the lab, NAT configuration on a Cisco router involves three steps. First, mark the interfaces as inside or outside. Second, define what gets translated, usually with an access list that matches the private addresses. Third, tie it together with a NAT statement that links the access list to the outside interface. Then test it with a ping from inside to outside, and check the translation table to see the entries appear. If you want to see how NAT fits with the rest of the exam, read our guide on how to pass the CCNA.

Padlock and laptop showing network security and NAT protection

The Downsides of NAT

NAT is useful, but it is not free. The first downside is that it breaks end-to-end connectivity. Two devices on different private networks cannot talk directly, because neither can reach the other's private address. They need a server in the middle, or port forwarding, or a VPN. That is why video calls and online games sometimes struggle: the two sides need help finding each other through NAT.

The third downside is that NAT hides information. A website sees your public address, not your device, which is good for privacy, but it also means the website cannot tell your devices apart. That is why some services block or challenge whole households when one device misbehaves. It is also why NAT is not a substitute for a real firewall. NAT hides your addresses, but it does not inspect traffic or block attacks. Use both.

None of this means NAT is bad. It saved the internet from running out of addresses, and it still does a vital job every day. But it is a workaround, and IPv6 is the proper fix. As IPv6 grows, NAT will slowly fade away, and devices will have their own public addresses again. Until then, NAT is something every network engineer needs to understand.

Watch on YouTube: Network Address Translation - N10-008 CompTIA Network+ : 1.4

NAT at home: port forwarding in plain English

Port forwarding is the one NAT setting most home users meet. Say you run a game server on a PC with the private address 192.168.1.50, and the game uses port 25565. Your friends on the internet cannot reach 192.168.1.50, because it is private. So you tell your router: when traffic arrives at my public address on port 25565, send it to 192.168.1.50 on port 25565. That rule is destination NAT, and your friends connect to your public address while the router does the delivery.

The same idea works for cameras, home servers, and remote access. The rule is simple: one port, one device. If you forward the same port to two devices, the router cannot tell which one should get the traffic. And every port you forward is a door into your network, so only forward what you need, and keep the software behind it updated. A forwarded port to an unpatched server is one of the most common ways home networks get compromised.

Frequently Asked Questions

What is NAT in simple terms?

NAT is a process that lets many devices with private IP addresses share one public IP address. The router changes the address in each packet as it passes through, and keeps a table so replies find their way back to the right device.

What is the difference between NAT and PAT?

PAT, or Port Address Translation, is a type of NAT. It lets many private addresses share one public address by using different port numbers to tell them apart. When people say NAT, they usually mean PAT, because it is the type home routers use.

Why do we need NAT?

Because IPv4 has only about 4.3 billion addresses, and there are more devices than that. NAT lets whole homes and offices share a single public address, which made the IPv4 supply last far longer than it otherwise would have.

Is NAT a firewall?

No. NAT hides your private addresses, which gives some protection, but it does not inspect traffic or block attacks. A real firewall checks traffic against rules and blocks what should not pass. Use both, and do not rely on NAT alone for security.

Does IPv6 need NAT?

Normally, no. IPv6 has enough addresses for every device to have its own public address, so there is nothing to share and nothing to translate. Some networks still use a form of NAT with IPv6, but it is the exception, not the rule.

Conclusion

NAT is the translator at the edge of your network. It takes private addresses, swaps them for a public one, and swaps them back when replies arrive. The translation table and the port numbers are what make it work, and PAT is the type that lets a whole home share one address.

It exists because IPv4 ran out of room, and it will fade as IPv6 takes over. But for now, it is everywhere, and understanding it explains a lot about how the internet actually works, from your home router to the largest office networks.

Related articles:

What Is IPv6 and Why Do We Need It?

The 128-bit successor to IPv4, and why the internet is slowly moving to it.

What Is an IP Address? A Complete Beginner's Guide

What an IP address is, public vs private, and how devices use them to find each other.

What Is DHCP? How Dynamic IP Assignment Works

How devices get their IP address automatically, and the DORA process behind it.

Want a clear price for your project?

Tell us what you need and we will send a free quote with no hidden charges.

Get a Free Quote