Distinguish the between intranet and official IP addresses

后端 未结 5 602
粉色の甜心
粉色の甜心 2021-02-06 11:03

How can I find out whether a given IP address is an official internet address or an internal intranet IP address?

5条回答
  •  不思量自难忘°
    2021-02-06 12:04

    10.0.0.0 - 10.255.255.255` (10.0.0.0/8, former Class A)

    172.16.0.0 - 172.31.255.255` (172.16.0.0/12, former Class B)

    192.168.0.0 - 192.168.255.255` (192.168.0.0/24, former Class C)

    Founding out that given IP belongs to that, depends in what form do you have given IP. The best way to use bytes.

提交回复
热议问题