区分内部网和官方IP地址

6 intranet ip-address

如何确定给定的IP地址是官方Internet地址还是内部Intranet IP地址?

Too*_*the 12

Intranet IP通常位于私有IP范围内:

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
Run Code Online (Sandbox Code Playgroud)

这些不适用于Internet IP地址.

另见http://compnetworking.about.com/od/workingwithipaddresses/f/privateipaddr.htm