Many articles have described whether the IP address is a public IP address. But I cannot remember it every time. I always need to find it again. So I decided to record it here to facilitate future query :)
There are five types of IP addresses. Class E is reserved for future use, and Class D is the multicast address. The host network addresses are Class A, Class B, and class C.
The IP addresses of these five categories have the following ranges:
In TCP/IP protocol, three IP address regions are reserved as private addresses. The address ranges are as follows:
10.0.0.0/8:10. 0.0.0 ~ 10.20.255.255
172.16.0.0/12: 172.16.0.0 ~ 172.31.255.255
192.168.0.0/16: 192.168.0.0 ~ 192.168.255.255
Networks with reserved addresses can only communicate internally, but cannot communicate with other networks. Because the reserved addresses in the Network may also be used by other networks, if the network is connected, the problem may occur because the address is not unique when looking for a route. However, these networks that use reserved addresses can interconnect with external networks by translating the reserved addresses in the network into public addresses. This is also an important way to ensure network security.
However, although some broadband carriers use non-private addresses for user use, other users on the Internet cannot access these IP addresses due to route settings.
In these two cases, the IP address of the application is called the Intranet IP address.
If the IP address of the network interface on your machine falls within the reserved IP address range, you can be sure that you are in Intranet mode.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/huanghongbo/archive/2006/06/23/825942.aspx