首先,目前全球分配总共有多少,先从IANA了解.
截止现在表格是这样的,其中真正可用就是五大机构的,非五大机构暂时不讨论.
前缀 | 注册机构 | 日期 | 状态 |
2002:0000::/16 | 6to4 | 2001/2/1 | 分配 |
2001:4200::/23 | AFRINIC | 2004/6/1 | 分配 |
2c00:0000::/12 | AFRINIC | 2006/10/3 | 分配 |
2001:0200::/23 | APNIC | 1999/7/1 | 分配 |
2001:0c00::/23 | APNIC | 2002/5/2 | 分配 |
2001:0e00::/23 | APNIC | 2003/1/1 | 分配 |
2001:4400::/23 | APNIC | 2004/6/11 | 分配 |
2001:8000::/19 | APNIC | 2004/11/30 | 分配 |
2001:a000::/20 | APNIC | 2004/11/30 | 分配 |
2001:b000::/20 | APNIC | 2006/3/8 | 分配 |
2400:0000::/12 | APNIC | 2006/10/3 | 分配 |
2001:0400::/23 | ARIN | 1999/7/1 | 分配 |
2001:1800::/23 | ARIN | 2003/4/1 | 分配 |
2001:4800::/23 | ARIN | 2004/8/24 | 分配 |
2600:0000::/12 | ARIN | 2006/10/3 | 分配 |
2610:0000::/23 | ARIN | 2005/11/17 | 分配 |
2620:0000::/23 | ARIN | 2006/9/12 | 分配 |
2630:0000::/12 | ARIN | 2019/11/6 | 分配 |
2001:0000::/23 | IANA | 1999/7/1 | 分配 |
2d00:0000::/8 | IANA | 1999/7/1 | 保留 |
2e00:0000::/7 | IANA | 1999/7/1 | 保留 |
3000:0000::/4 | IANA | 1999/7/1 | 保留 |
3ffe::/16 | IANA | Apr-08 | 保留 |
5f00::/8 | IANA | Apr-08 | 保留 |
2001:1200::/23 | LACNIC | 2002/11/1 | 分配 |
2800:0000::/12 | LACNIC | 2006/10/3 | 分配 |
2001:0600::/23 | RIPE NCC | 1999/7/1 | 分配 |
2001:0800::/22 | RIPE NCC | 2002/11/2 | 分配 |
2001:1400::/22 | RIPE NCC | 2003/7/1 | 分配 |
2001:1a00::/23 | RIPE NCC | 2004/1/1 | 分配 |
2001:1c00::/22 | RIPE NCC | 2004/5/4 | 分配 |
2001:2000::/19 | RIPE NCC | 2019/3/12 | 分配 |
2001:4000::/23 | RIPE NCC | 2004/6/11 | 分配 |
2001:4600::/23 | RIPE NCC | 2004/8/17 | 分配 |
2001:4a00::/23 | RIPE NCC | 2004/10/15 | 分配 |
2001:4c00::/23 | RIPE NCC | 2004/12/17 | 分配 |
2001:5000::/20 | RIPE NCC | 2004/9/10 | 分配 |
2003:0000::/18 | RIPE NCC | 2005/1/12 | 分配 |
2a00:0000::/12 | RIPE NCC | 2006/10/3 | 分配 |
2a10:0000::/12 | RIPE NCC | 2019/6/5 | 分配 |
总结起来是这样的.
注册机构 | 实际分配 | /48数量 | /64数量 | /128数量 |
AFRINIC | /23+/12 | 68753031168 | 4505798650626048 | 83117314555764545397335835770093568 |
APNIC | /21+/18+/12 | 69927436288 | 4582764464570368 | 84537083228020162327012143360114688 |
ARIN | /23+/22+/11 | 137539616768 | 9013796324507648 | 166275193930736394135519566042759168 |
LANIC | /23+/12 | 68753031168 | 4505798650626048 | 83117314555764545397335835770093568 |
RIPE NCC | /21+/17+/11 | 139720654848 | 9156732836118528 | 168911907179211111290632708709941248 |
看着眼花了吗?这个数字反正我不会数,总量是585958813449496758547836089653002240个/128,地球沙子总量大概1.67x10^23,大概可以每个沙子编3508735409877.226个地址,眼看可以给沙子编个/87子网(2199023255552个IP地址)也是完全没问题的.
而且所有IPv6都启用的话,就是IANA全分配,没保留的话,大概有42535295865117307932921825928971026432个/128(全球单播地址都在2000::/3中)可用,现在只是启用了1.3775825500488281%,只大致相当于IANA拿了个/9出来分,以后要是谁跟我吹XXX运营商有/8的IPv6就啪啪啪打脸了.
地壳主要由岩石构成,其中沙子的含量是很少的,为了方便计算,我们姑且将其计为千分之一吧。 那么地球上沙子的总质量就约为2.505 x 10^19kg,用这个数字再除以地球上沙粒的平均质量0.00015kg,于是我们得出地球上沙子总数量为1.67 x 10^23粒。
来自谷歌搜索
那么是不是这样每个IPv6的IP数量都多到数不胜数,不是的,首先子网的第一个地址不推荐用,他是子网任播(除非子网是/127和/128),如果子网下所有机器都没开IP包转发这没事,一旦开了就容易出问题,所以不推荐使用.
子网分割大小 | /48地址数量 | /64地址数量 | /128地址数量(不包含任播) |
0 | 281474976710656 | 18446744073709551616 | 340282366920938463463374607431768211455 |
1 | 140737488355328 | 9223372036854775808 | 170141183460469231731687303715884105727 |
2 | 70368744177664 | 4611686018427387904 | 85070591730234615865843651857942052863 |
3 | 35184372088832 | 2305843009213693952 | 42535295865117307932921825928971026431 |
4 | 17592186044416 | 1152921504606846976 | 21267647932558653966460912964485513215 |
5 | 8796093022208 | 576460752303423488 | 10633823966279326983230456482242756607 |
6 | 4398046511104 | 288230376151711744 | 5316911983139663491615228241121378303 |
7 | 2199023255552 | 144115188075855872 | 2658455991569831745807614120560689151 |
8 | 1099511627776 | 72057594037927936 | 1329227995784915872903807060280344575 |
9 | 549755813888 | 36028797018963968 | 664613997892457936451903530140172287 |
10 | 274877906944 | 18014398509481984 | 332306998946228968225951765070086143 |
11 | 137438953472 | 9007199254740992 | 166153499473114484112975882535043071 |
12 | 68719476736 | 4503599627370496 | 83076749736557242056487941267521535 |
13 | 34359738368 | 2251799813685248 | 41538374868278621028243970633760767 |
14 | 17179869184 | 1125899906842624 | 20769187434139310514121985316880383 |
15 | 8589934592 | 562949953421312 | 10384593717069655257060992658440191 |
16 | 4294967296 | 281474976710656 | 5192296858534827628530496329220095 |
17 | 2147483648 | 140737488355328 | 2596148429267413814265248164610047 |
18 | 1073741824 | 70368744177664 | 1298074214633706907132624082305023 |
19 | 536870912 | 35184372088832 | 649037107316853453566312041152511 |
20 | 268435456 | 17592186044416 | 324518553658426726783156020576255 |
21 | 134217728 | 8796093022208 | 162259276829213363391578010288127 |
22 | 67108864 | 4398046511104 | 81129638414606681695789005144063 |
23 | 33554432 | 2199023255552 | 40564819207303340847894502572031 |
24 | 16777216 | 1099511627776 | 20282409603651670423947251286015 |
25 | 8388608 | 549755813888 | 10141204801825835211973625643007 |
26 | 4194304 | 274877906944 | 5070602400912917605986812821503 |
27 | 2097152 | 137438953472 | 2535301200456458802993406410751 |
28 | 1048576 | 68719476736 | 1267650600228229401496703205375 |
29 | 524288 | 34359738368 | 633825300114114700748351602687 |
30 | 262144 | 17179869184 | 316912650057057350374175801343 |
31 | 131072 | 8589934592 | 158456325028528675187087900671 |
32 | 65536 | 4294967296 | 79228162514264337593543950335 |
33 | 32768 | 2147483648 | 39614081257132168796771975167 |
34 | 16384 | 1073741824 | 19807040628566084398385987583 |
35 | 8192 | 536870912 | 9903520314283042199192993791 |
36 | 4096 | 268435456 | 4951760157141521099596496895 |
37 | 2048 | 134217728 | 2475880078570760549798248447 |
38 | 1024 | 67108864 | 1237940039285380274899124223 |
39 | 512 | 33554432 | 618970019642690137449562111 |
40 | 256 | 16777216 | 309485009821345068724781055 |
41 | 128 | 8388608 | 154742504910672534362390527 |
42 | 64 | 4194304 | 77371252455336267181195263 |
43 | 32 | 2097152 | 38685626227668133590597631 |
44 | 16 | 1048576 | 19342813113834066795298815 |
45 | 8 | 524288 | 9671406556917033397649407 |
46 | 4 | 262144 | 4835703278458516698824703 |
47 | 2 | 131072 | 2417851639229258349412351 |
48 | 1 | 65536 | 1208925819614629174706175 |
49 | 32768 | 604462909807314587353087 | |
50 | 16384 | 302231454903657293676543 | |
51 | 8192 | 151115727451828646838271 | |
52 | 4096 | 75557863725914323419135 | |
53 | 2048 | 37778931862957161709567 | |
54 | 1024 | 18889465931478580854783 | |
55 | 512 | 9444732965739290427391 | |
56 | 256 | 4722366482869645213695 | |
57 | 128 | 2361183241434822606847 | |
58 | 64 | 1180591620717411303423 | |
59 | 32 | 590295810358705651711 | |
60 | 16 | 295147905179352825855 | |
61 | 8 | 147573952589676412927 | |
62 | 4 | 73786976294838206463 | |
63 | 2 | 36893488147419103231 | |
64 | 1 | 18446744073709551615 | |
65 | 9223372036854775807 | ||
66 | 4611686018427387903 | ||
67 | 2305843009213693951 | ||
68 | 1152921504606846975 | ||
69 | 576460752303423487 | ||
70 | 288230376151711743 | ||
71 | 144115188075855871 | ||
72 | 72057594037927935 | ||
73 | 36028797018963967 | ||
74 | 18014398509481983 | ||
75 | 9007199254740991 | ||
76 | 4503599627370495 | ||
77 | 2251799813685247 | ||
78 | 1125899906842623 | ||
79 | 562949953421311 | ||
80 | 281474976710655 | ||
81 | 140737488355327 | ||
82 | 70368744177663 | ||
83 | 35184372088831 | ||
84 | 17592186044415 | ||
85 | 8796093022207 | ||
86 | 4398046511103 | ||
87 | 2199023255551 | ||
88 | 1099511627775 | ||
89 | 549755813887 | ||
90 | 274877906943 | ||
91 | 137438953471 | ||
92 | 68719476735 | ||
93 | 34359738367 | ||
94 | 17179869183 | ||
95 | 8589934591 | ||
96 | 4294967295 | ||
97 | 2147483647 | ||
98 | 1073741823 | ||
99 | 536870911 | ||
100 | 268435455 | ||
101 | 134217727 | ||
102 | 67108863 | ||
103 | 33554431 | ||
104 | 16777215 | ||
105 | 8388607 | ||
106 | 4194303 | ||
107 | 2097151 | ||
108 | 1048575 | ||
109 | 524287 | ||
110 | 262143 | ||
111 | 131071 | ||
112 | 65535 | ||
113 | 32767 | ||
114 | 16383 | ||
115 | 8191 | ||
116 | 4095 | ||
117 | 2047 | ||
118 | 1023 | ||
119 | 511 | ||
120 | 255 | ||
121 | 127 | ||
122 | 63 | ||
123 | 31 | ||
124 | 15 | ||
125 | 7 | ||
126 | 3 | ||
127 | 2 | ||
128 | 1 |
/48是BGP的最小子网,然后包含65536个/64,然后每个/64包含18446744073709551616个/128地址(包含任播),足够任何场合使用,当然依然建议只需要1个IP的场合用/127的点对点分配或者/128的单地址分配,不推荐用DHCPv6,因为没法下发整个子网,而且Next Hop反正也要SLAAC分配.
[…] IPv6有几个地址可用?给每个沙子够用吗? […]