Glossary

What is NAT?

NAT (Network Address Translation) rewrites IP addresses in packet headers at the network edge. We explain SNAT, DNAT, PAT and the trade-offs.

Last updated:

NAT (Network Address Translation) rewrites IP addresses in packet headers as they pass through a router or firewall at the network edge. Its most common use is mapping many private addresses from the RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) onto one or a few public IPv4 addresses, so an entire internal network can reach the internet without giving every host a public address. NAT keeps a translation table that binds inside sessions to outside ones and reverses the mapping for return traffic.

SNAT and DNAT

The direction of translation splits NAT into two basic kinds. Source NAT (SNAT) rewrites the source address of outbound packets and is the most common case: a private host reaches the internet using the router's public address. Destination NAT (DNAT) rewrites the destination address of inbound packets and is used to publish services, i.e. port forwarding, where traffic to a public address is sent to a chosen internal server. Static 1:1 NAT permanently binds one private address to one public address in both directions.

PAT, or NAT overload

PAT (Port Address Translation), also called NAT overload or masquerading, is a variant of SNAT in which many hosts share a single public address by distinguishing sessions through the transport-layer port number. The router records the inside host's source address and port plus the assigned outside port, so it can map return traffic back to the right host. This is the mechanism running in a typical home or office router.

  • SNAT rewrites the source address of outbound traffic (private network reaching the internet).
  • DNAT rewrites the destination address of inbound traffic (port forwarding, publishing services).
  • PAT multiplexes many sessions onto one public address by port number (theoretical limit of roughly 65k ports per address).
  • Static 1:1 NAT gives a permanent, bidirectional one-to-one mapping.
  • NAT is stateful: it must hold a translation table and entries time out after idle periods.

Pros and cons of NAT

The main benefit of NAT is conserving IPv4 addresses and hiding internal addressing behind a single public address, which is sometimes treated as an extra layer of isolation. The drawbacks are significant, though. NAT breaks end-to-end connectivity, hampers protocols that embed addresses in the application payload (FTP, SIP, some P2P games) and needs ALG modules or NAT traversal techniques (STUN, TURN, ICE), while the translation device is stateful and can become a bottleneck. In IPv6, where addresses are abundant, NAT for address conservation is unnecessary and discouraged in favor of native end-to-end connectivity.

NAT versus CGNAT, and where AS202520 SkyPass fits

Classic NAT runs at the customer's network edge, whereas CGNAT (Carrier-Grade NAT) is the same idea applied at scale inside an operator's network, where thousands of subscribers share a pool of public addresses. AS202520 SkyPass delivers IP transit and peering in full dual-stack with native IPv4 and IPv6, so you can keep clean, well-routed public addressing where NAT is undesirable and reduce dependence on large-scale translation. With PoPs in Warsaw and Wrocław and peering at THINX, TPIX, WRIX and 1-IX, we provide end-to-end connectivity without needless translation layers.

Frequently asked questions

What is the difference between SNAT and DNAT?

SNAT rewrites the source address of outbound traffic, so a private host uses the router's public address. DNAT rewrites the destination address of inbound traffic and is used for port forwarding and publishing internal services to the outside.

Is PAT the same as NAT?

PAT is a variant of NAT (specifically SNAT) where many hosts share one public address and sessions are told apart by transport-layer port numbers. This variant, also called NAT overload or masquerading, is what runs in a typical home router.

Which address ranges are used with NAT?

Most often the private RFC 1918 ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are not routable on the internet and must be translated to a public address before traffic leaves the network.

Is NAT needed in IPv6?

Not for address conservation. The IPv6 space is practically unlimited, so every host can have a global address and end-to-end connectivity. NAT in IPv6 is discouraged, and security is provided by a stateful firewall rather than translation.

Related articles