Fundamentals 8 min read

How Many IPv4 Addresses Does China Really Have? Exploring IANA, APNIC, and Cloud Providers

This article explains the total number of IPv4 addresses worldwide, details special‑purpose ranges, shows how to retrieve and parse APNIC’s allocation data to calculate China’s share, compares figures from CNNIC and cloud providers like Alibaba Cloud, and highlights the discrepancy between advertised and actual address pools.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How Many IPv4 Addresses Does China Really Have? Exploring IANA, APNIC, and Cloud Providers

IPv4 Address Basics

IPv4 uses a 4‑byte unsigned integer (0‑4294967295) to represent an address, giving a theoretical maximum of about 4.29 billion addresses. In practice we write them in dotted‑decimal form (e.g., 192.168.0.1), covering the range 0.0.0.0 to 255.255.255.255. Many of these addresses are reserved for special purposes.

10.0.0.0 – 10.255.255.255 172.16.0.0 – 172.31.255.255 192.168.0.0 – 192.168.255.255

IANA Special‑Purpose Registry

The Internet Assigned Numbers Authority (IANA) maintains a public registry of all special‑purpose IPv4 blocks. For example, the entire 127.0.0.0/8 range (127.0.0.0‑127.255.255.255) is reserved for loopback, not just the familiar 127.0.0.1 address.

China’s IPv4 Allocation via APNIC

APNIC, the regional Internet registry for the Asia‑Pacific, publishes a daily‑updated file delegated-apnic-latest that lists all allocated IP blocks. Each line follows the format:

registry|country|type|start|count|date|status

Filtering for China (country code CN) yields 8 614 IPv4 netblocks. The following Python script sums the address counts to compute the total number of IPv4 addresses allocated to mainland China.

import sys
total = 0
print('target file: %s' % sys.argv[1])
with open(sys.argv[1]) as fp:
    while True:
        line = fp.readline()
        if line:
            fields = line.split('|')
            ip = fields[3]
            num = int(fields[4])
            print('ip: %s, num: %d' % (ip, num))
            total += num
        else:
            break
print('total: %d' % total)

The script reports a total of 343,881,984 IPv4 addresses for China, about 8 % of the global IPv4 space. Applying the same method to Taiwan, Hong Kong, and Macau yields 35,688,960; 12,612,096; and 336,640 addresses respectively, for a combined 392,519,680 addresses (≈9.14 % of the total).

Official Chinese Statistics

The China Internet Network Information Center (CNNIC) published its 48th statistical report in September 2021, stating that China’s IPv4 pool is about 393 million addresses, which aligns closely with the APNIC‑derived figure, allowing for minor timing differences.

Alibaba Cloud IPv4 Holdings

Publicly available IP databases (e.g., ip.taobao.com) show that Alibaba Cloud has roughly 3.7 million active IPv4 addresses, with historical data indicating over 15 million total allocated addresses in 2019. For comparison, Amazon’s cloud services reportedly hold more than 75 million IPv4 addresses.

Conclusion and Thought Question

Although IPv4 addresses are scarce, cloud providers maintain large pools that rotate as customers lease and release IPs, allowing inexpensive public IP acquisition. The article ends with a challenge: what is the difference between the IP addresses 0.0.0.0 and 127.0.0.1?

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

cloud computingChinaIPv4IANAIP address allocationAPNIC
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.