Distinguish the between intranet and official IP a

2019-03-16 08:23发布

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

5条回答
兄弟一词,经得起流年.
2楼-- · 2019-03-16 08:47

Intranet IP's are often in the private IP range:

10.0.0.0 through 10.255.255.255
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255

These are not usable for internet IP addresses.

See also http://compnetworking.about.com/od/workingwithipaddresses/f/privateipaddr.htm

查看更多
ら.Afraid
3楼-- · 2019-03-16 09:00

Besides those A,B,C intranet classes, there are other reserved addresses not used as public internet IPs, especially:

  • 127.x.y.z (loopback)
  • 0.x.y.z (reserved broadcast)
  • 224-255.x.y.z (multicast & future use)

There are also many wasted IP addresses (legacy from stupid ages). You won't see most addresses in range

  • cca 3-40.x.y.z (i.e. 17.x.y.z wasted for Apple Computers)
查看更多
何必那么认真
4楼-- · 2019-03-16 09:01

RFC 1918 defines some IP address ranges which can't exist on the internet, and are therefore suitable for intranet use (i.e. 10/8, 172.16/12, 192.168/16).

Apart from that, what do you mean? Are you trying to find out which IPs are on the same subnet as your own machine, or on some other 3rd party network?

See also http://en.wikipedia.org/wiki/Private_network

查看更多
混吃等死
5楼-- · 2019-03-16 09:08

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.

查看更多
别忘想泡老子
6楼-- · 2019-03-16 09:13

The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets:

 10.0.0.0        -   10.255.255.255  (10/8 prefix)
 172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
 192.168.0.0     -   192.168.255.255 (192.168/16 prefix)

source

查看更多
登录 后发表回答