Uniqcli

What Is NAT? Network Address Translation and PAT Explained

How address translation stretches scarce IPv4 space, where NAT and PAT sit at the network edge, and why it is a routing function rather than a security control.

By Uniqcli Team

NAT (Network Address Translation) is a router function that rewrites the IP addresses, and often the port numbers, in packet headers as traffic crosses between networks — most commonly to let many private devices share one public IPv4 address. Defined for the internet at large by RFC 3022, NAT sits at the boundary between a privately addressed network and the public internet. As a packet leaves, the translator swaps the device's private source address for a routable public one and records the mapping; when the reply arrives, it consults that record and reverses the swap so the response reaches the exact internal host that started the conversation.

You meet NAT every time a laptop, phone, or server on an office or campus network reaches the internet through a single public address, and again whenever a home or branch router hands a private 192.168.x.x address to everything behind it. In enterprise and government fleets it is a baseline capability quietly expected of routers, firewalls, and SD-WAN appliances rather than a product in its own right. Understanding what NAT does — and, just as important, what it does not do — matters because it shapes how internal services are published, how remote sites reach one another, and how heavily a network still leans on scarce IPv4 addresses versus native IPv6.

How does NAT actually work?

The heart of NAT is a translation table the router maintains. When a device on the private network sends a packet toward the internet, the router replaces the private source address in the header with a public, routable address, and it writes down the mapping between the two. Because most consumer and small-business setups have only one public address, the router also rewrites the source port so it can tell overlapping conversations apart. It stores that combination — the internal address and port, the chosen external address and port, and the destination — as a single entry, then forwards the modified packet on toward its destination.

When the reply comes back, it is addressed to the public IP and port the router selected. The router looks up the matching table entry, rewrites the destination back to the original private address and port, and delivers the packet to the correct internal host. This is why NAT is fundamentally a stateful, outbound-triggered mechanism: an internal device starting a conversation creates the mapping that lets the answer return. Traffic arriving from the internet with no matching entry has nowhere to go, which is the behavior people often mistake for a firewall — the router simply holds no record telling it where to deliver an unsolicited packet.

What is the difference between NAT and PAT?

Plain NAT can be one-to-one: a single private address is mapped to a single public address, which is how you publish an internal server on its own routable IP. What almost everyone actually runs at home and across branch offices is PAT — Port Address Translation, also called NAT overload or IP masquerading. PAT is the many-to-one case formally described as NAPT in RFC 3022 and drawn from the terminology in RFC 2663. Those three names are vendor and community labels for the same NAPT mechanism, not separate standards; each multiplexes many internal hosts behind one public address by giving every conversation a distinct port number.

That reliance on ports carries a structural limit. TCP and UDP each use a 16-bit port field, so only ports 0 through 65535 exist per protocol, which caps how many simultaneous translated sessions one public address can theoretically multiplex. Real devices hit far lower effective limits because of table memory, per-destination uniqueness rules, and shared ephemeral pools, so treat that ceiling as a property of the header, not a capacity guarantee. When even that is not enough, providers add another layer: Carrier-Grade NAT (CGNAT) translates many subscribers behind a shared pool, using the RFC 6598 100.64.0.0/10 range reserved so it will not collide with customers' own private addresses.

Why do private IP addresses need NAT at all?

Private addressing exists because there were never enough IPv4 addresses to give every device a unique public one. RFC 1918 reserves three blocks for private use — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — that any organization may use internally without registration. The catch is deliberate: the RFC states these addresses have no global meaning and that packets carrying them should not be forwarded across the public internet. Routers on the internet are expected to drop such traffic, so a device with a private address literally cannot be reached from outside until something translates it to a public address first.

The scarcity that made this necessary is not hypothetical. IANA allocated the last of its top-level IPv4 blocks on February 3, 2011, and ARIN, the registry for North America, exhausted its own free pool on September 24, 2015. With no new IPv4 addresses to hand out, sharing a small number of public addresses across many private hosts became the default way networks operate. That is the working distinction between a public IP address — globally unique and routable across the internet — and a private one that is valid only inside a given network; NAT is the bridge that lets the second kind reach the first.

Is NAT a firewall? No, and why that matters

No — and conflating the two causes real procurement mistakes. NIST's firewall guidance, SP 800-41 Revision 1, frames NAT as a routing technology rather than a firewall technology. NAT does hide internal addresses as a side effect, and NIST SP 800-53's boundary-protection control, SC-7, lists address translation as one acceptable way to keep internal components from being discovered. But that control's actual requirement is a managed interface — a gateway, router, or firewall that monitors and controls communications at the boundary — not NAT on its own. NAT satisfies an address-hiding technique; it does not satisfy a security control.

The protection people credit to a NAT router — that unsolicited inbound connections are blocked — comes from the stateful connection tracking the device performs, not from translation. A dedicated stateful firewall delivers that same protection without NAT's side effects, which include breaking protocols such as IPsec, DNSSEC, and geolocation that expect end-to-end addresses. For anyone evaluating network hardware, the practical takeaway is concrete: a requirement for boundary security should call for genuine stateful firewall inspection, and "NAT support" on a data sheet should never be accepted as evidence that a device meets a security requirement.

What are port forwarding, hairpinning, and double NAT?

Because PAT only creates mappings for outbound conversations, reaching an internal server from the internet needs an explicit rule. Port forwarding is that rule: a static entry saying traffic arriving on a given external port should be sent to a specific internal address and port. It is how a camera, a game server, or an on-premises application gets published. A related but separate feature is hairpinning, also called NAT loopback or NAT reflection, which lets a device inside the network reach that same server using the router's public address rather than its private LAN address. Many routers support port forwarding but not hairpinning, producing the classic "works from outside, fails from inside" support ticket.

Double NAT is when two translating devices sit in series — typically your own router behind an ISP gateway or CGNAT that is also performing NAT. Outbound browsing usually still works, so it often goes unnoticed. It breaks down when something needs a stable inbound path: static port forwarding on the inner router no longer reaches the internet, and stacked translators are more likely to behave as symmetric NAT, which changes the external port per destination. That behavior is a common reason peer-to-peer connections fail in online gaming and real-time voice or video, where two endpoints must predict each other's external addresses to connect directly.

Does IPv6 get rid of NAT?

Mostly, but not entirely. IPv6's address space is so large that NAT's original purpose — stretching scarce addresses — simply disappears, and RFC 4864 explicitly recommends that enterprises use global, routable IPv6 addressing rather than recreating NAT on IPv6. That direction is also a federal driver: OMB Memorandum M-21-07 set IPv6-only targets of at least 20% of IP-enabled assets by the end of FY2023, 50% by FY2024, and 80% by FY2025. Those deadlines have arrived without confirmed full compliance, and agencies continue reporting progress into FY2026, so "NAT recedes on IPv6" describes an active direction of travel rather than a finished transition.

Translation still has a job during the long coexistence period, though. NAT64, paired with DNS64 and defined in RFC 6146, lets IPv6-only clients reach IPv4-only servers through a shared pool of public IPv4 addresses on a translator, so address translation shifts from hiding hosts to bridging the two protocols. Prefix translation for IPv6 (NPTv6) also survives for niche renumbering and multihoming cases. For buyers, that means IPv6 readiness on new routers and firewalls increasingly implies dual-stack operation plus NAT64/DNS64 for legacy IPv4 back ends — capabilities worth specifying explicitly rather than assuming they ship enabled.

Key takeaways

  • NAT rewrites the addresses and ports in packet headers at the network edge so many private hosts can share one public IPv4 address.
  • PAT — also called NAT overload or IP masquerading — is the many-to-one NAPT case, and the 16-bit port field is its structural ceiling.
  • RFC 1918 private ranges (10/8, 172.16/12, 192.168/16) have no global meaning, so they cannot reach the internet without translation.
  • NIST classifies NAT as a routing technology, not a firewall — inbound protection comes from stateful inspection, not from NAT itself.
  • Port forwarding, hairpinning, double NAT, and CGNAT are the practical friction points behind failed inbound and peer-to-peer connections.
  • IPv6's address abundance removes NAT's original rationale, but NAT64/DNS64 still bridges IPv6-only clients to IPv4-only servers during transition.

Shop it at Uniqcli

Frequently asked

What is Carrier-Grade NAT (CGNAT), and how do I know if my ISP is using it?
Carrier-Grade NAT (CGNAT) is NAT run by your internet provider, so many subscribers share a pool of public IPv4 addresses instead of each getting their own. RFC 6598 set aside the 100.64.0.0/10 block specifically for the link between your router and the ISP's CGNAT equipment. A quick test: compare the WAN address shown on your router's status page with the public address a "what is my IP" lookup reports. If they differ — or your router shows an address in the 100.64 to 100.127 range — you are almost certainly behind CGNAT, which typically blocks inbound port forwarding and self-hosting.
What is the difference between NAT and a VPN?
They solve different problems. NAT rewrites addresses so private hosts can share a public IP and receive replies in the right order; it is a routing function at the network edge and adds no encryption. A VPN (virtual private network) builds an encrypted tunnel between two endpoints so traffic is confidential and authenticated as it crosses an untrusted network, and it can make a remote device appear to sit inside a private network. The two frequently coexist: a site-to-site VPN often carries traffic between networks that each still run their own NAT, and VPN gateways commonly have to account for NAT devices somewhere in the path.
How do I set up NAT or port forwarding on my router?
The exact steps vary by vendor, but the pattern is consistent. Basic outbound NAT is enabled by default on virtually every home and business router, so nothing is needed for devices to reach the internet. To publish an internal service, add a port-forwarding rule in the router's admin interface: choose the external port, the internal device's private IP address, and the internal port, then save. Give that device a static or DHCP-reserved address first so the rule does not break when its IP changes. If forwarding still fails, confirm you are not behind CGNAT or a second NAT device upstream, either of which can silently prevent inbound connections.
Why does an online game report a "Strict" NAT type, and can I fix it?
A "Strict" or "Type 3" NAT label means the console or app could not freely open the inbound paths it wants for peer-to-peer voice and matchmaking, usually because the router uses restrictive port mapping or because two NAT devices are stacked in series. The most common culprit is double NAT — your own router sitting behind an ISP gateway or CGNAT that also performs translation. Fixes include bridging the upstream modem so only one device does NAT, enabling UPnP or a manual port-forwarding rule, or asking the ISP for a public, non-CGNAT address. When the upstream translation is truly symmetric, a direct connection may not be fixable from your side alone.

About the author

Uniqcli Team

Uniqcli's newsroom, buying guides and glossary are produced by our in-house team — seven procurement and technology professionals who source, screen and integrate IT and security hardware every day, working with two editors. Practitioners draft from live sourcing and integration work; editors review every piece for accuracy and plain language before it publishes.

More about the Uniqcli Team
Ask AI about Uniqcli

What is a PDU?

Speccing hardware for a project?

Send your requirement or a bill of materials — we confirm stock, TAA country of origin and a below-market total. No payment up front.