Skip to content
Fresh IPv4 news just dropped — 🎉 see what you’re missing

Carrier-Grade NAT (CGNAT) Explained

Reviewed by Marek Dvořák, Network engineer

Carrier-grade NAT shares one public IPv4 address across many subscribers. It is the standard answer to address scarcity at access-network scale, and the reason a growing share of consumer connections cannot accept an inbound connection.

How it works

The subscriber’s CPE receives an address from 100.64.0.0/10 — shared address space, defined by RFC 6598 — rather than a public one. Traffic leaving the access network passes through a CGN device that rewrites source addresses and ports to a public address from a pool.

Three subscriber CPE WAN addresses, 100.64.1.10, 100.64.1.11, and 100.64.1.12, use TCP source port 51514. The provider CGNAT translates them to one public-side IPv4 address, 203.0.113.9, using source ports 40001, 40002, and 40003. Stored mappings direct replies to the correct subscriber; LAN-side NAT is omitted.

The reason for a dedicated range matters. Subscribers already use RFC 1918 space inside their homes and offices. If the provider used 10.0.0.0/8 on the same segment, the subscriber’s own network and the provider’s would collide, and the CPE would have no way to distinguish them. 100.64.0.0/10 gives 4,194,304 addresses that exist nowhere else, which is why it should never be used as ordinary internal space — see private IP ranges.

The port budget decides everything

A public address has 65,536 TCP ports and the same number of UDP ports, of which roughly 64,000 are usable per protocol. That number, divided by the ports you allocate per subscriber, is your subscriber-per-address ratio.

Three equal-length example budgets each contain 64,000 ports for one public IPv4 address and one protocol. Each raised tile represents one subscriber: allocating 1,000 ports gives 64 subscribers, 2,000 ports gives 32, and 4,000 ports gives 16. Larger per-subscriber allocations reduce subscriber density; TCP and UDP have separate budgets.

Ports per subscriberSubscribers per addressTypical experience
512~125Aggressive; visible failures on modern web pages
1,024~62Workable for light use, tight for households
2,048~31Common default
4,096~16Comfortable, including video and gaming

The pressure comes from how applications behave rather than how much bandwidth they use. A single modern web page can open dozens of concurrent connections, and each connection consumes a port for the duration plus a timeout afterwards. Video conferencing, streaming, and background sync from a household of devices add up quickly.

Set the allocation too high and you save no addresses. Set it too low and you generate support calls that are almost impossible to diagnose from the subscriber’s side, because the failure looks like a slow or broken website rather than an exhausted port pool.

What it costs beyond the hardware

Five operational areas surround a CGNAT hardware platform: logging requires storage and subscriber lookups; shared reputation creates blocklist and CAPTCHA work; inbound limitations create support and service constraints; geolocation errors affect location and fraud decisions; and connection state requires memory and failover capacity. The tiles identify cost categories, not their relative amounts.

Logging. Determining which subscriber used a public address at a given moment requires records. Per-connection logging at scale produces volumes that are expensive to store and slow to query. Allocating a fixed port block per subscriber and logging only the block assignment, as recommended in RFC 6888, reduces this by orders of magnitude — but it has to be designed in, not retrofitted.

Shared reputation. Subscribers sharing an egress address also share its reputation. Abuse from one subscriber can lead to blocklists, CAPTCHAs, or delivery failures for others using that address. Review a candidate prefix’s routing and origin history, and check relevant blocklists before accepting a range. Keep abuse response and pool segmentation in the operating plan: clean starting inventory does not prevent new abuse.

Broken inbound. Port forwarding stops working. Self-hosted services, security cameras, remote desktop, some VoIP configurations, console gaming with strict NAT requirements, and peer-to-peer applications all degrade or fail. Each of these becomes a support ticket, and the honest answer is often that the product no longer supports the use case.

Geolocation drift. Geolocation services see the public egress address, which can serve subscribers across a wide area. This can affect regional content, pricing, and fraud decisions. Check the public pool’s location in the databases your services depend on, and agree who maintains the geofeed and handles corrections. Providers apply updates on their own schedules; correcting a prefix’s location does not identify each subscriber behind a shared address.

State at scale. The CGN device holds connection state for every active flow. It is a single point of failure with a memory limit, and its capacity planning is a separate exercise from bandwidth planning.

When the economics stop working

CGNAT is genuinely cheaper than public addressing at the low end, where subscribers are numerous and undemanding. The comparison narrows as soon as any of the following apply:

  • Business customers. They need inbound reachability, and a public address is usually part of the product. CGNAT is not an option here at any price.
  • Support load exceeds the saving. Each broken-inbound ticket has a cost. At some subscriber count the tickets outweigh the address cost.
  • Logging storage becomes material. Retention requirements vary by jurisdiction, and the storage bill compounds.
  • Reputation incidents recur. Time spent on delisting and the churn from affected subscribers is a real cost that never appears in the CGNAT business case.

The comparison worth running is total cost per subscriber over the equipment’s life, including logging storage and a realistic support estimate, against the amortised cost of address space serving the same subscribers. Dedicated public IPv4 is worth evaluating for business tiers and any segment where inbound connectivity is part of the service. Telecom and ISP address planning applies this decision to egress pools, business static IPs, regional capacity, and block acceptance checks.

The IPv6 relationship

CGNAT is a bridge, not a destination. The end state for most access networks is IPv6 to the subscriber with a translation mechanism for IPv4-only destinations — 464XLAT on mobile, MAP-T or MAP-E on fixed access, or dual-stack where public IPv4 is available.

Deploying IPv6 does not remove the need for IPv4 in the short term, because the destinations subscribers reach are not all dual-stacked. What it does is reduce the IPv4 traffic that has to cross the CGN, which stretches the same address pool further and buys planning time.

Related

Last updated on