Home>Article> What does the slash 24 after the IP address mean?

What does the slash 24 after the IP address mean?

青灯夜游
青灯夜游 Original
2019-04-01 16:10:11 80040browse

The slash 24 after the IP address indicates that the mask bits are 24 bits, that is, there are 24 consecutive [1] in the subnet mask represented by 32-bit binary, such as [11111111 11111111 11111111 00000000] , convert it into decimal, it is [255.255.255.0].

What does the slash 24 after the IP address mean?

The slash 24 after the IP address indicates that the mask bit is 24 bits, that is, there are consecutive 24 in the subnet mask expressed in 32-bit binary "1":11111111 11111111 11111111 00000000, convert it into decimal, it is:255.255.255.0.

IP address refers to the Internet Protocol address, which is a unified address format provided by the IP protocol. It assigns a logical address to every network and every host on the Internet to shield the physical address. difference.

The IP address is composed of four decimal numbers, which is equivalent to 32-bit binary. It is usually expressed in the form of "dotted decimal" (a.b.c.d), where a, b, c, and d are all decimal integers between 0 and 255. Example: The dotted decimal IP address (100.4.5.6) is actually a 32-bit binary number (01100100.00000100.00000101.00000110).

The ip address followed by a slash and a specific number is a network segment, or subnet, expressed in the form of CIDR (Classless and Subnet AddressExtensions and Supernetting).

We know that to determine a subnet, we need to know the host address and subnet mask, but in the form of CIDR, we can simply get two values. For example, 192.168.0.0/24" means that the IP address of this network segment starts from 192.168.0.1 and ends at 192.168.0.254 (192.168.0.0 and 192.168.0.255 have special meanings and cannot be used as IP addresses); sub The net mask is 255.255.255.0.

How did the above subnet mask come from? In fact, the key is "24". We know that the IP address is composed of four decimal numbers, which is equivalent to 32 bits Binary. Using CIDR representation, the latter number separates these 32 bits (taking 24 as an example): the first 24 bits are represented by "1", and the last 8 bits are represented by 0, resulting in a binary number:

11111111 11111111 11111111 00000000

Convert it to decimal, it is:255.255.255.0.

The above is this article All the content, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the related tutorial columns ofphp Chinese website!!!

The above is the detailed content of What does the slash 24 after the IP address mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn