Judging the machine IP is a public IP or an intranet IP

xiaoxiao2021-04-08  418

First of all, congratulations to open Blog

Whether IP is public IP, there are many articles on the Internet. But I can't remember every time, I always look for it again. Therefore, I decided to record it here, it is convenient to query :)

The IP address is divided into five categories. The E class is reserved for future use, and the D class is a multicast address. The host network address is a class, Class B, C class.

The respective ranges of these five types of IP addresses are as follows:

In the TCP / IP protocol, three IP address areas are retained as private addresses, and their address ranges are as follows:

10.0.0.0/8:10.0.0.0~10.255.255.255

172.16.0.0.0~172.31.255.255

192.168.0.0.0.0~192.168.255.255

The network that uses the reserved address can only be communicated inside without interconnection with other networks. Because the retention address in this network may also be used by other networks, if the network interconnect is performed, it will be problematic when looking for the route due to the unique address. However, these networks that use retention addresses can be interconnected with external networks by converting retention address translation in this network to a common address. This is also one of the important ways to ensure network security.

However, some broadband operators use non-private address allocation to the user, but other users on the Internet cannot access these IPs due to routing settings.

We use the IP used in these two situations called the intranet IP.

If the IP address of the network interface on your machine is within the scope of the above reserved address, you can definitely in the intranet mode.

转载请注明原文地址:https://www.9cbs.com/read-132777.html

New Post(0)