Fundamentals 8 min read

How Many IPv4 Addresses Exist? Uncovering Global, Chinese, and Alibaba Cloud IP Pools

This article explains the total number of IPv4 addresses worldwide, details China's allocated IPv4 blocks, shows how to extract and sum them using a script, and compares the IP holdings of major Chinese cloud providers and global giants like Amazon.

Open Source Linux
Open Source Linux
Open Source Linux
How Many IPv4 Addresses Exist? Uncovering Global, Chinese, and Alibaba Cloud IP Pools

IP Addresses

When I provision a cloud server I usually request a public IP address. Seeing the allocated address made me wonder: if IPv4 addresses are supposedly exhausted, why can I still obtain one? How many does Alibaba Cloud hold, and how many does China have in total?

We still primarily use IPv4, which uses a 4‑byte unsigned integer ranging from 0 to 4,294,967,295, giving a maximum of about 4.29 billion addresses. For readability we write them in dotted‑decimal notation, e.g., 0.0.0.0 to 255.255.255.255.

Not all of these 4.29 billion addresses are usable; many are reserved for special purposes. The three well‑known private ranges are:

10.0.0.0 – 10.255.255.255 172.16.0.0 – 172.31.255.255 192.168.0.0 – 192.168.255.255

Beyond these, numerous other special‑purpose ranges exist and are listed on the IANA website.

IANA

IANA (Internet Assigned Numbers Authority) manages global IP address allocation. Its special‑purpose IPv4 registry can be found at

https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml

.

The loopback address is commonly known as 127.0.0.1, but the entire block 127.0.0.0‑127.255.255.255 (16,777,216 addresses) is reserved for loopback.

China's IPv4 Address Count

IP address allocation worldwide is handled by five regional registries; China’s addresses are managed by APNIC. APNIC publishes a daily updated file delegated-apnic-latest that lists all allocations.

http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest

Each line follows the format: registry|country|type|start|count|date|status. Filtering for China (country code CN) and IPv4 yields the following result (as of 2021‑12‑01): 8,614 IPv4 blocks.

Summing the address counts with a simple script gives a total of 343,881,984 IPv4 addresses, about 8 % of the global IPv4 space.

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)

Applying the same method to Taiwan, Hong Kong and Macau yields:

Taiwan: 35,688,960

Hong Kong: 12,612,096

Macau: 336,640

Combined, these regions account for 392,519,680 addresses, roughly 9.14 % of the global IPv4 space.

According to the 48th China Internet Development Report (CNNIC, September 2022), China’s IPv4 allocation in June 2022 was about 393 million, which aligns with the above calculation.

Alibaba Cloud's IPv4 Address Count

Data from a public IP database (ip.taobao.com) shows Alibaba Cloud has roughly 370 W+ (≈3.7 million) active IPv4 addresses. Historical data from 2019 indicates Alibaba Cloud owned over 15 W+ (≈15 million) total IPv4 addresses, and the number has likely grown since.

For comparison, Amazon’s cloud reportedly holds over 75 W+ (≈75 million) IPv4 addresses as of two years ago.

In summary, while IPv4 addresses are scarce, cloud providers maintain large pools that are continuously recycled, allowing users to obtain public IPs at low cost.

Thought question: 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.

NetworkingChinaIPv4FundamentalsAlibaba CloudIANAIP address allocation
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

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.