Detailed IP address trailing slash plus specific numbers

Source: Internet
Author: User
Tags ip number

Tag: The number following the trailing slash IP address of the IP address

Detailed IP address trailing slash plus specific numbers
Hzhsan: In layman's words, the number behind the slash represents the number of "1" in front of the 32-bit subnet mask (binary form).
and the previous "IP address" is not an IP address, but an IP network segment. The preceding segments can be further subdivided into specific subnets through the following numbers.
In fact, this is a network segment expressed in CIDR form, or subnet.CIDR: Classless Inter-domain route selection, classless and Subnet Address Extensions and supernettingWe know that a subnet needs to know the host address and subnet mask, but in CIDR form, you can simply get two values. For example, 192.168.0.0/24 "says, The IP address of this segment begins with 192.168.0.1 and ends with 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 did the above subnet mask come from? In fact, the key is on the "24". We know that the IP address is made up of four decimal numbers, which is equivalent to a 32-bit binary. In CIDR notation, the last digit breaks the 32 bits (taking 24 as an example): The first 24 bits are denoted by "1", the next 8 bits are denoted by 0, and a binary number is obtained: 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, the subnet mask is: 255.255.255.0, in binary notation: 11111111 11111111 11111111 00000000, Why this is 24, just because the subnetThe number of the front continuous "1" in the mask is 24, and must be continuous. Let me give you an example.192.168.1.0/28 means that the net segment is 192.168.1.0, the subnet mask is: 255.255.255.240, in binary notation: 11111111 11111111 11111111 11110000.        This time you may be puzzled, is 24 and 282 characters are different, why the network segment is the same?         24 bit Description Network bit is 24 bit, then the host bit is 32-24 = 8 bit, then the number of subnets IP is 254, that is, from 00000001 to 11111110. 28-bit Description The network bit is 28 bits, then the host bit 4 bits, the subnet IP number is 14, that is, from 00000001 to 00001110.

Detailed IP address trailing slash plus specific numbers

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.