当前位置: 首页 > news >正文

[network] IPv4 vs. IPv6 address pool

 

===============

let’s expand on that precisely.


1. IPv4 address space size

Each IPv4 address is 32 bits long.
Therefore, the total number of possible combinations is:

[
2^{32} = 4,294,967,296
]

That’s roughly 4.29 billion unique addresses.


2. Why we don’t actually have 4.29 billion usable public addresses

A large portion of that space is reserved for special uses.
Examples:

RangePurposeNotes
0.0.0.0/8 “This network” Used in routing contexts.
10.0.0.0/8 Private networks (RFC 1918) Not publicly routable.
127.0.0.0/8 Loopback 127.0.0.1 = localhost.
169.254.0.0/16 Link-local (APIPA) Used when no DHCP server.
172.16.0.0/12 Private networks Not routable.
192.168.0.0/16 Private networks Not routable.
224.0.0.0/4 Multicast Not unicast.
240.0.0.0/4 Reserved for future use Historically unused.
255.255.255.255 Broadcast Special all-hosts address.

After subtracting all of those, the number of publicly routable IPv4 addresses is closer to ~3.7 billion.


3. The consequence: IPv4 exhaustion

Because of this limited pool, IPv4 addresses began running out.
Regional Internet Registries (RIRs) officially exhausted their free pools between 2011 and 2019.
The world has since relied on:

  • NAT (Network Address Translation) — allowing thousands of devices to share a single public address.

  • CIDR (Classless Inter-Domain Routing) — to allocate space more efficiently.

  • IPv6 — the successor protocol, with 2¹²⁸ addresses, effectively inexhaustible for the foreseeable future.


4. Quick comparison

ProtocolAddress bitsTotal addressesExample
IPv4 32 4,294,967,296 192.168.1.100
IPv6 128 340,282,366,920,938,463,463,374,607,431,768,211,456 2001:0db8::1

IPv6 has about 7.9×10²⁸ times as many addresses as IPv4.


So yes — (2^{32}) defines the theoretical IPv4 address space, but in practice, only a fraction of that is globally usable.

 

 

==================================

 

let’s write out 2001:0db8::1 in binary form step by step.


1. IPv6 address structure

An IPv6 address has 128 bits, written as 8 groups of 16-bit hexadecimal blocks, separated by colons:

2001:0db8::1

The :: means a run of zero blocks has been compressed.
Let’s first expand it fully.


2. Expand the compressed form

2001:0db8::1 expands to:

2001:0db8:0000:0000:0000:0000:0000:0001

Now we have 8 groups (each 16 bits = 4 hex digits).


3. Convert each group to binary

Each hexadecimal digit → 4 binary bits.

GroupHexBinary
1 2001 0010 0000 0000 0001
2 0db8 0000 1101 1011 1000
3 0000 0000 0000 0000 0000
4 0000 0000 0000 0000 0000
5 0000 0000 0000 0000 0000
6 0000 0000 0000 0000 0000
7 0000 0000 0000 0000 0000
8 0001 0000 0000 0000 0001

4. Concatenate them all

The full 128-bit binary form is:

0010000000000001 0000110110111000 0000000000000000 0000000000000000
0000000000000000 0000000000000000 0000000000000000 0000000000000001

Or, without spaces:

00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001

5. Verification

  • 8 × 16 bits = 128 bits

  • Each group corresponds exactly to its hex block ✅

So in binary,
2001:0db8::1 = 0010 0000 0000 0001 0000 1101 1011 1000 … (rest all zero) … 0000 0000 0000 0001.

 

http://www.gsyq.cn/news/47791.html

相关文章:

  • 【为美好CTF献上祝福】浅学花指令
  • 能耗在线监测体系:革新能源管理模式,助推企业节能减排
  • 2025/11/14
  • 一份用pyhon生成word/wps蓝墨云班题库的代码
  • 公开仓库中的哈希值暴露安全风险分析
  • Kibana基本命令操作
  • 如何在 .NET 中使用 SIMD
  • Linux shell映射表(变量的变量)
  • Java 集合-Set
  • 2025-11-12 ZYZ28-NOIP-aoao round 2 hetao1733837的record
  • fabricjs 整合 vue3-sketch-ruler 实现标尺功能
  • 2025年真空耙式干燥机定做厂家权威推荐榜单:真空单锥螺带干燥机/沸腾床干燥机/闪蒸干燥机源头厂家精选
  • 基础查找算法(三)二分查找
  • 2025年济南统招专升本学校权威推荐榜单:专升本机构报名/全日制专升本/专升本考试培训学校精选
  • (3)Bug篇 - 详解
  • 西林瓶灌装轧盖机:黔东南折旧年限与成本解析
  • 高精度除法模板(p1480)
  • 焊接工业机器人节气装置
  • 枣庄西林瓶灌装轧盖机:SIP灭菌快,自动冷却高效
  • 已完成今日基础缩索大学习
  • 配置ElactisSearch跨域
  • 西林瓶粉末灌装机:塔城培训服务免费提供
  • 一份用pyhon生成word/wps文档的代码2
  • 2025-11-12 aoao Round2 赛后总结
  • 南大-操作系统-绿导师原谅你了
  • 深入解析:EI会议预订又又+1
  • QCombox判断是否包含某项
  • 基于Newmark-β法的单自由度体系地震响应MATLAB实现
  • 物理光学中光束传输与变换的数值模拟研究
  • 精度、正确率、召回率的简单理解