如何看ipv6的位址範圍

來源:互聯網
上載者:User
怎麼看ipv6的位址範圍啊
我不會看ipv6的位址範圍,比如下面這兩個位址範圍是指從哪個地址到哪個地址啊?
2406:6200::|32
240e:100::|24
為什麼平時的ip庫都是分開的,放在同一個表中會有什麼問題嗎?

------解決方案--------------------
這都是16進位表示,2位元組一個:。

::表示接下來的都是0.

mysql還是可以操作的,unhex啊,substring,replace啊,看你需求了。
------解決方案--------------------
IP地址是可以按照字串比較大小的, 要計算範圍內的每一個IP, 可以gmp/bc直接當做大數運算, 我說的是PHP, 你有需求可以給你寫個樣本?
------解決方案--------------------
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 
------解決方案--------------------
探討

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
$ipv6_start = "2……

------解決方案--------------------
2400:ff00::|32
應該是從
2400:ff00:0000:0000:0000:0000:0000:0000
-
2400:ff00:0000:0000:0000:0000:ffff:ffff
後面的CIDR是位元, 32位就是ffff:ffff


  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.