2

Whilst reading Tanenbaum - Computer Networks they talk about IP scarcity at the level of ISPs:

IP addresses are scarce. An ISP might have a /16 address, giving it 65,534 usable host numbers. If it has more than that, it has a problem.

In the next few pages there is a talk about DHCP and NAT to solve this problem. So I googled around and found out that certain ISPs do indeed use CGNAT to link a certain area (street, group of houses, ..) behind one NAT box.

I know the use of CGNAT is rather controversial, organisations such as Europol are doing their best to get rid of it altogether. So is/was there another way to do it? Or did most ISPs turn to IPv6 the moment they started to run out of IPs without resorting to CGNAT.

1
  • I haven't seen any evidence of Europol trying to get rid of CGNAT. Realistically the only way to get rid of CGNAT is to deploy IPv6 and then turn down IPv4. Yet I haven't seen any political drive towards deploying IPv6. And any trouble CGNAT cause to Europol is not even the most compelling argument in favor of pushing harder for IPv6.
    – kasperd
    Commented Feb 16, 2019 at 16:18

2 Answers 2

5

Tannenbaum exaggerated a bit. While IPv4 addresses are indeed scarce, ISPs could get as many addresses as they needed. They had to show good justification though, by showing the number of customers, DHCP leases etc. But large ISPs (or large hosting providers like Amazon) can have millions of IPv4 addresses.

These days it works differently. Normal distribution of IPv4 addresses has run out, so you can only get a tiny amount. After that you'll have to convince someone to sell you some of their addresses. The are specialised brokers for this as well.

This means that technologies that use address-sharing mechanisms are unavoidable. The most useful ones work on an IPv6-only backbone and provide IPv4 as a service over the top. That way the least amount of IPv4 space is wasted. Some of them like MAP and Lw4o6 don't even use CGN but share based on port number, which makes them much cheaper to implement.

3

Until fairly recently ISPs could get all the IPv4 addresses they could justify. Most fixed-line ISPs in the west got an IPv4 IP for every subscriber.

Mobile providers on the other hand tended to run widespread NAT at the ISP level, I suspect this is because while it would have been easy enough to get an IP for each subscriber it would have been difficult to get enough IPs to have large local pools "just in case" a large number of subscribers converge on a given area.


However now IPv4 IPs have run out at ICANN and most RIRs and even privately held stocks are dwindling. Plain IPv6 is not a solution because the majority of Internet services do not support it yet. Many ISPs who did not previously implement address sharing have either recently had to do so or are looking at having to do so in the foreseeable future.

So some form of mechanism for sharing IPv4 addresses is needed. There are a number out there each with their pros and cons including.

  • Conventional IPv4 NAT
  • NAT64+DNS64 (Using DNS to point clients at a stateful ISP based stateful NAT64)
  • DS-lite (encapsulating packets and sending them to a special stateful ISP based NAT44)
  • 464XLAT (a mostly stateless* NAT46 on the client side combined with a stateful NAT64 on the ISP side)
  • MAP-T (a stateful NAT44 with port range restriction and a mostly stateless NAT46 on the client side combined with a mostly stateless NAT64 on the ISP side)
  • MAP-E (a stateful NAT44 with port range restriction on the client side, then encapsulating the packets and sending them over a tunnel to a special routing/encapsulation box at the ISP).

(and probably several others I haven't been following)

Another wrinkle on the mobile side is that some mobile networks are running out of private IPv4 or worse have already resorted to "squat space". Much of the "squat space" that mobile networks were using has now been allocated for use on the Internet. I recall having problems with T-Mobile USA subscribers being unable to access my server because it had an IP address from 5.0.0.0/8.

This has led to a number of mobile networks (beginning with T-Mobile USA) starting to gradually move away from traditional IPv4 NAT and towards NAT64/DNS64. On Andriod and Windows Mobile 464XLAT has been implemented to ease the transition for legacy applications. Apple decided not to implement 464XLAT and instead require application developers to make their applications work in a NAT64 environment.

Which address sharing mechanisms will become the most popular for fixed-line connections is still an open question at this point.

* Translation between IPv6 and IPv4 requires fragment handling, so even if the IP/port processing is stateless the overall translation process is not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.