What do you think of IPv6 's address range?
I will not look at the address range of IPv6, such as the following two address range refers to from which address to which address ah?
2406:6200::|32
240e:100::|24
Why are the usual IP libraries separate, and what are the problems in the same table?
------Solution--------------------
This is all 16 binary representations, 2 bytes one:.
:: That means the next 0.
MySQL still can operate, Unhex Ah, substring,replace Ah, see you need.
------Solution--------------------
IP address can be compared to the size of the string, to calculate the range of each IP, you can gmp/bc directly as a large number of operations, I am talking about PHP, you have the need to write an example for you?
------Solution--------------------
PHP Code
[User:root time:09:54:16 path:/home/liangdong/php]$ php ip.php 2406:6200:0000:0000:0000:0000:0000:0000[user:root Time:09:54:17 path:/home/liangdong/php]$ Cat ip.php
------Solution--------------------
discuss
PHP Code
[User:root time:09:54:16 path:/home/liangdong/php]$ php ip.php
2406:6200:0000:0000:0000:0000:0000:0000[user:root time:09:54:17 path:/home/liangdong/php]$ Cat ip.php
$IPV 6_start = "2 ...
------Solution--------------------
2400:ff00::|32
should be from
2400:ff00:0000:0000:0000:0000:0000:0000
-
2400:ff00:0000:0000:0000:0000:ffff:ffff
The following CIDR is the number of bits, and 32 bits is FFFF:FFFF