Detailed description of the IP address followed by a slash and a specific number

Source: Internet
Author: User

In fact, this form is represented by a CIDR (classless and subnet address extensions and supernetting), or a subnet.

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 indicates 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). The subnet mask is 255.255.255.0.

How does the above subnet mask come from? In fact, the key lies in "24. We know that the IP address is composed of four decimal numbers, which is equivalent to 32-bit binary. In CIDR format, the last digit separates the 32 bits (taking 24 as an example): the first 24 bits are represented by "1", and the last 8 bits are represented by 0, get a binary number:

11111111 11111111 11111111 00000000. Convert it to decimal, that is, 255.255.255.0.

For example, 192.168.1.0/24 indicates that the network segment is 192.168.1.0, The subnet mask is 24 bits, and the subnet mask is 255.255.255.0. In binary format, the subnet mask is 11111111 11111111 11111111. Why is this 24, because the number of consecutive "1" in the front of the subnet mask is 24, it must be continuous.

For example, 192.168.1.0/28 indicates that the network segment is 192.168.1.0, The subnet mask is 255.255.255.255.240, And the subnet mask is 11111111 11111111 11111111 in binary format.

At this time, you may be confused, that is, the 24 and 28 words are different. Why is the network segment the same?

24-bit indicates that the network bit is 24-bit. If the host bit is 32-24 = 8-bit, the number of subnet IP addresses is 254, that is, from 00000001 to 11111110.

The 28-bit indicates that the network bit is 28 BITs. If the host bit is 4 bits, the number of subnet IP addresses is 14, that is, from 00000001 to 00001110.

Subnet calculator:

  

  

Detailed description of the IP address followed by a slash and a specific number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.