IPv4
Carrier-grade NAT or dedicated IPv4 addresses: a decision guide
If you operate subscriber lines or platforms and have too few IPv4 addresses, you can share addresses, obtain addresses, or carry IPv4 only as a service over an IPv6 network. Each route puts the cost in a different place.
What CGN is and how widespread it is
Network address translation (NAT) is familiar from the router on the subscriber's line: many devices with private addresses share one public address. Carrier-grade NAT (CGN, also CGNAT) moves this principle into the provider's network. RFC 6888 describes CGN as a function that lets multiple subscribers share one IPv4 address and that is not managed by the customer.2 In most cases this creates a second translation layer behind the NAT on the customer router.6
Since 2012, the segment between the customer router and the CGN has had a range of its own: 100.64.0.0/10, the “Shared Address Space” defined in RFC 6598. The private ranges from RFC 1918 are suitable for this only if it is certain that the customer does not use the same networks behind their router. Addresses from 100.64.0.0/10 must not leave the provider's network.1
RFC 6888 sets out minimum requirements for a CGN, including a configurable limit on ports per subscriber and a protocol that lets customers control port forwarding themselves; the Port Control Protocol is recommended. The document explicitly states that it is not an endorsement of CGN.2
How widespread the technology is was measured in a study published at the ACM IMC 2016 conference. It covered more than 60 percent of the networks that connect end customers. On the fixed-line side, 17 to 18 percent of these access networks used CGN; on the mobile side, more than 90 percent. In the regions of APNIC and the RIPE NCC, which ran out of addresses first, the share was more than twice as high as in the others.6 The data dates from 2014 to 2016.
The port math
An IPv4 address has 65,536 ports per transport protocol. Leaving out the system ports 0 to 1,023, that leaves 64,512. The sharing ratio determines how many of them a subscriber can occupy at most at any one time.
Scroll sideways to see more columns.
| Sharing ratio | Ports per subscriber | Subscribers per /24 (256 addresses) |
|---|---|---|
| 1:16 | around 4,000 | 4,096 |
| 1:32 | around 2,000 | 8,192 |
| 1:64 | around 1,000 | 16,384 |
| 1:128 | around 500 | 32,768 |
Values like these occur in practice. The 2016 measurement found one network with around 4,000 ports per subscriber, but also six networks with fewer than 1,000 and three with only 512 ports. That corresponds to up to 128 subscribers per public address. The authors consider 512 worryingly low, because loading even a single web page can open dozens of connections.6
Dynamic allocation makes better use of the addresses, because most subscribers occupy only a small fraction of their maximum. At the same time, RFC 6269 points out that a single infected host can quickly exhaust the shared pool of an address.3
Side effects of shared addresses
RFC 6269 compiled the consequences in 2011.3 For operators, four matter most:
- Reputation: If a shared address ends up on a blocklist because of one customer, everyone who shares it is affected. The same applies to protection mechanisms that lock out an address after failed attempts.3 We have a separate article on blocklist cleanup.
- Inbound connections: Services on well-known ports are generally not reachable behind a shared address, and unsolicited inbound packets are dropped.3 Anyone who wants to give customers port forwarding, servers of their own or VPN endpoints needs a control protocol on the CGN or a dedicated address.
- Geolocation: A subscriber is located where the CGN's prefix appears to be, not where the customer actually is.3
- Direct connections: Many of the CGNs measured in 2016 were more restrictive than typical customer routers. This prevents direct connections between end devices and forces applications such as WebRTC onto relay servers.6
Identification and logging
Behind a CGN, an IPv4 address no longer identifies a subscriber. Anyone who has to attribute an abuse report or a request from the authorities also needs the source port and the exact time. RFC 6302 therefore recommends that all server operators log the source port in addition to the address, with a timestamp in UTC that is accurate to at least the second and comes from a traceable time source.4 If the port is missing from a report, all that remains is the set of all subscribers that shared the address at that moment.
For the operator of the CGN, this means logging on a large scale. RFC 7422 did the math in 2014: a log entry is around 150 bytes, and according to reports from several operators in the US, a household generated about 33,000 connections per day on average. That comes to around 5 megabytes per subscriber per day and, for a provider with one million subscribers, about 150 terabytes per month.5
The way out is deterministic allocation: each internal address is mapped by a fixed scheme to a public address with a port range. It is then enough to retain the configuration; individual connections no longer need to be logged. The price is poorer utilization of the addresses, which makes the method less suitable for very high sharing ratios.5 RFC 6888 names the trade-off: a port allocation scheme can optimize utilization, log volume or the unpredictability of ports, each at the expense of the other goals.2
IPv4 as a service over IPv6
Three IETF mechanisms carry IPv4 over an access network that speaks only IPv6. IPv6 traffic passes without translation; only the remaining IPv4 traffic gets special handling.
- 464XLAT (RFC 6877): The end device or the customer router translates IPv4 statelessly into IPv6, and a provider gateway translates statefully back to shared public IPv4 addresses. This works for connections from the customer to servers with a public IPv4 address, not for inbound IPv4 connections.7
- DS-Lite (RFC 6333): The customer router tunnels IPv4 in IPv6 to a central device that performs the NAT for all subscribers. The customer router itself is no longer supposed to translate, so there is only one NAT layer. Port limits and logging have to be solved as with CGN.9
- MAP-E (RFC 7597): Each customer router is given, by a mapping rule, a fixed port range of a shared address and does the translation itself. The device at the border to the IPv4 internet operates statelessly. A subscriber can also be assigned a whole address or a prefix.8
All three have one thing in common: the IPv4 addresses remain shared, so the side effects for IPv4 persist. The gain is in operations: the access network carries only one protocol, and every service that is reachable over IPv6 bypasses the translation.7 Our article on IPv6 in 2026 shows how far that goes today.
The comparison
Scroll sideways to see more columns.
| Criterion | CGN | Dedicated public addresses | IPv6 with translation |
|---|---|---|---|
| IPv4 demand | low, depending on the sharing ratio | one address per subscriber or service | low, as with CGN |
| Inbound connections | only with a control protocol, or not at all | unrestricted | restricted over IPv4, direct over IPv6 |
| Reputation and blocklists | one customer affects everyone sharing the address | separate for each customer | for IPv4, as with CGN |
| Attribution in abuse cases | address, port and time; logging or fixed port blocks | address and time | as with CGN; with MAP-E, computable from address and port |
| Operations | stateful device in the data path, two protocols in the access network | no additional device | one protocol in the access network; customer routers or end devices must support the mechanism |
| Ongoing costs | equipment, operations, log storage | purchase or lease of the addresses | gateway and compatible customer routers |
For the cost of addresses there is a point of reference: a 2025 study found median lease prices of around US$0.50 per address per month on two marketplaces.10 At 32 subscribers per address, by our calculation less than 2 cents of that falls on each subscriber, not counting the cost of the CGN. The math for buying and leasing is in the article Lease or buy IPv4 addresses.
Which route fits when
- CGN fits residential lines and mobile networks with predominantly outbound traffic, provided the sharing ratio stays moderate and logging is planned in from the start.
- Dedicated addresses fit everything that has to be reachable from outside or whose reputation matters: business lines, mail servers, VPN endpoints, hosting and cloud platforms.
- IPv6 with translation fits access networks that are new or due for renewal anyway, provided customer routers and end devices support the mechanism.
- Both together is possible: shared addresses as the default, and a fixed public address as an option for customers who need one.
We can help with the addresses you need: leasing IPv4 addresses and buying IPv4 addresses.
Sources
- IETF: RFC 6598 (BCP 153): IANA-Reserved IPv4 Prefix for Shared Address Space, April 2012
- IETF: RFC 6888 (BCP 127): Common Requirements for Carrier-Grade NATs (CGNs), April 2013
- IETF: RFC 6269: Issues with IP Address Sharing, June 2011
- IETF: RFC 6302 (BCP 162): Logging Recommendations for Internet-Facing Servers, June 2011
- RFC Editor, Independent Submission: RFC 7422: Deterministic Address Mapping to Reduce Logging in Carrier-Grade NAT Deployments, December 2014
- Richter et al., ACM IMC 2016: A Multi-perspective Analysis of Carrier-Grade NAT Deployment, 2016
- IETF: RFC 6877: 464XLAT: Combination of Stateful and Stateless Translation, April 2013
- IETF: RFC 7597: Mapping of Address and Port with Encapsulation (MAP-E), July 2015
- IETF: RFC 6333: Dual-Stack Lite Broadband Deployments Following IPv4 Exhaustion, August 2011
- Degen et al., TMA Conference 2025: From Scarcity to Opportunity: Examining Abuse of the IPv4 Leasing Market, 2025