Engineering Hub · CGNAT in Production

Running CGNAT: Sizing, Logging, and Everything Subscribers Complain About

Updated Oct 29, 2026 By NFWare Engineering Team 7 guides

64,512
usable ports per public IPv4 address and protocol (1024–65535)
≤ 128
subscribers per public IPv4 address on NFWare vCGNAT
vCGNAT 6.4 documentation
4
log export formats: Syslog, NetFlow v9, IPFIX, RADIUS Accounting
vCGNAT 6.4 documentation
RFC 6888
baseline requirements every carrier-grade NAT should meet
IETF
On this page
  1. Sizing and port allocation
  2. Logging and compliance
  3. What breaks for subscribers
  4. Deploying and choosing a CGNAT
  5. All guides
  6. FAQ

Running CGNAT in production comes down to three decisions: how many ports each subscriber gets, how you log translations so you can answer a lawful request, and what you do about the applications that break when subscribers share a public IPv4 address.

Get the first one wrong and heavy users run out of ports at peak hour. Get the second wrong and you store terabytes of logs nobody can search. Get the third wrong and your support line fills up with gamers and people who can no longer reach their home cameras. This section collects the numbers, configurations and support scripts that ISP engineers use to make those decisions, with a link to the full guide for each topic.

SizingPort allocation and subscribers per address

Every subscriber behind CGNAT gets a slice of the 64,512 usable ports on a shared public address. The size of that slice decides three things at once: how many subscribers fit on one address, how often a heavy user hits the ceiling, and how many log records you write.

A browser tab can open dozens of connections, a game console keeps several long sessions alive, and a home with ten devices adds them all up. That is why the right number of ports per subscriber comes from your own traffic, not from a vendor default. Measure peak sessions per subscriber first, then pick a block size with headroom for the busiest five percent of users.

Public address 203.0.113.10 · TCP Port block size 512 · up to 126 blocks
010245120… 65535
Subscriber (inside)Port blockLogged once per
100.64.12.7203.0.113.10 : 1024–1535block allocation
100.64.12.8203.0.113.10 : 1536–2047block allocation
100.64.12.9203.0.113.10 : 2048–2559block allocation
100.64.13.21203.0.113.10 : 2560–3071block allocation
The bar shows the first 5,120 ports to scale: ports below 1024 are reserved, each coloured segment is one 512-port block.

Inside addresses come from the shared address space 100.64.0.0/10, reserved for exactly this purpose by RFC 6598. With port block allocation the CGNAT writes one log line when it hands a block to a subscriber, instead of one line per session.

How many subscribers can be behind one IPv4 address

Divide 64,512 by the ports you give each subscriber and you get the ceiling: 126 subscribers with 512-port blocks, 63 with 1,024-port blocks. The practical number is lower, because some users need a second block and some applications need more ports than others. The guide walks through the arithmetic and the traffic patterns that push it up or down.

Read the guide

Port allocation and sizing: ports per subscriber, port blocks, session table

How to pick a block size, when to allow a second block, how large the session table must be, and which counters warn you about port exhaustion before subscribers notice it.

Coming soon

CGNAT sizing calculator

Enter the number of subscribers, ports per subscriber and peak sessions, and get the number of public addresses, the session table size and the memory you need.

Coming soon

LoggingLogging and compliance

When an address is shared, a lawful request has to arrive with three details to identify a subscriber: the public IP address, the port and the exact time. The logging method you choose decides how much data you keep to answer it.

MethodWhat gets loggedLog volume
Per-session loggingevery translation: inside and outside address, ports, start and end timehighest
Port block allocationone record when a block is assigned and one when it is releasedlow
Deterministic NATnothing per session: the mapping is calculated from the subscriber address (RFC 7422)minimal

Per-session logging answers any question but produces the most data by far. Port block allocation cuts the volume sharply, because a block stays with a subscriber for hours while sessions last seconds or minutes, and each record still points to exactly one subscriber. Deterministic NAT goes further and removes per-session logs altogether, at the price of a fixed, smaller port range for each subscriber.

CGNAT logging and compliance: log volume, deterministic NAT, retention

How the three methods compare on storage and on how quickly you can answer a request, how long to keep the data, and which export to use: Syslog (RFC 5424), NetFlow v9, IPFIX (RFC 7011) or RADIUS Accounting.

Read the guide

TroubleshootingWhat breaks for subscribers

Most CGNAT tickets come from a short list of applications that expect an inbound connection or a stable public address: online games, peer-to-peer apps, VPN servers at home, IP cameras and some VoIP setups. The operator can fix a good part of this in the CGNAT configuration; the rest needs a clear answer from support.

What breaks behind CGNAT: gaming NAT type, P2P, inbound VPN, CCTV, SIP

Why a console reports Strict NAT, why a home camera stops being reachable from outside, and which of these problems endpoint-independent mapping and filtering (RFC 4787) solve on the CGNAT side.

Read the guide

Port forwarding alternatives for CGNAT subscribers

STUN and ICE for peer-to-peer apps, Port Control Protocol (RFC 6887) for devices that can request a port, static port blocks and an opt-out public address for customers who need inbound access. What each option solves and what it costs the operator.

Coming soon

Double NAT, NAT444 and hairpinning

A subscriber router behind a CGNAT means two layers of translation, often called NAT444. When that is harmless, when it breaks applications, and why two subscribers on the same CGNAT need hairpinning (required by RFC 4787) to reach each other through their public addresses.

Coming soon

Do we still need ALGs in CGNAT

Application-level gateways rewrite addresses inside FTP, SIP and DNS traffic. Which of them still matter on a modern network, which ones break more than they fix, and how to decide per protocol.

Read the guide

DeploymentDeploying and choosing a CGNAT

Where the CGNAT sits in the network decides how traffic reaches it and what happens when it fails. The choice of product decides how many servers you need and how you will handle logging and upgrades. Delivering IPv4 over an IPv6 access network with DS-Lite or MAP is covered in IPv6 Transition.

CGNAT deployment topologies: inline, on a stick, BNG and CMTS integration

Common placements, how traffic is steered to the CGNAT and back, and Active/Standby versus Active/Active (N+1) designs that keep sessions alive when a node fails.

Read the guide

How to choose a CGNAT

Throughput and sessions per server, logging options, high availability, compliance with RFC 6888 and the licensing model: the criteria that separate CGNAT products in practice, and the questions to ask every vendor.

Read the guide

CGNAT disadvantages and myths

Which complaints about CGNAT hold up, which are out of date, and what to do about the ones that are real: shared IP reputation, inbound access and the cost of logging.

Read the guide

How widely CGNAT is deployed

Measurements of CGNAT use by region and by network type, updated as new data appears.

Coming soon

All guides in CGNAT in Production

Guides explain how something works and how to set it up. Data pages are updated as new measurements appear.

GuideHow many subscribers can be behind one IPv4 addressThe arithmetic of shared addresses and what pushes it up or down.SizingRead →
GuidePort allocation and sizingBlock size, second blocks and monitoring port exhaustion.SizingComing soon
CalculatorCGNAT sizing calculatorPublic addresses, session table and memory for your subscriber base.SizingComing soon
GuideLogging and compliancePer-session, port block and deterministic logging compared.LoggingRead → GuideWhat breaks behind CGNATGaming NAT type, P2P, inbound VPN, CCTV and SIP.TroubleshootingRead →
GuidePort forwarding alternativesSTUN/ICE, PCP, static port blocks and opt-out public IPs.TroubleshootingComing soon
GuideDouble NAT, NAT444 and hairpinningWhen a second NAT layer is fine and when it breaks things.TroubleshootingComing soon
GuideDo we still need ALGs in CGNATFTP, SIP and DNS gateways on a modern network.TroubleshootingRead → GuideCGNAT deployment topologiesInline, on a stick, BNG and CMTS integration, high availability.DeploymentRead → GuideHow to choose a CGNATThe criteria that separate CGNAT products in practice.DeploymentRead → GuideCGNAT disadvantages and mythsWhich complaints hold up and what to do about them.DeploymentRead →
DataHow widely CGNAT is deployedMeasurements by region and network type.DeploymentComing soon

Planning a CGNAT rollout?Our engineers will help you size it for your subscriber base.

FAQ

How many subscribers can share one public IPv4 address behind CGNAT?

It depends on how many ports each subscriber gets. One address has 64,512 usable ports per protocol, so 512-port blocks fit about 126 subscribers and 1,024-port blocks fit about 63. NFWare vCGNAT supports up to 128 subscribers per public address.

Do I have to log every CGNAT session?

No. Port block allocation writes one record per block instead of one per session, and deterministic NAT calculates the mapping from the subscriber address, so it needs no per-session logs at all. Check what your regulator requires before you choose.

Why do games show Strict NAT behind CGNAT?

The console cannot receive inbound connections it did not start. Endpoint-independent mapping and filtering (RFC 4787) and Port Control Protocol help many games. Subscribers who still need inbound access can be offered a public address.

How do I know subscribers are running out of ports?

Watch two numbers: failed port allocations and the share of subscribers who have used their whole port block. If either keeps growing, increase the block size or let heavy users take a second block.