192.168.1.1 255.255.255.0 netmask subcode mask Computer Count

Source: Internet
Author: User

What is the difference between 192.168.2.1/24 and 192.168.1.1/24?

 

 

Is two different network segments, the subnet mask is 24,
The first value range is 192.168.2.1 ~ 255,
The second value ranges from 192.168.1.1 ~ 255

These are two CIDR blocks. The last 24 indicates that its subnet mask is 255.255.255.0.
Continue to ask: why is the mask the same but not the same CIDR Block?
The third segment of their IP addresses is different ..
The mask is only used to determine the number of host bits in a CIDR block.
Ifconfig eth0 192.168.0.1 netmask 255.255.255.0
Ifconfig br0 192.168.0.1 netmask 255.255.255.0
-------------------------------------------------------------

1111 1111. 1111 1111. 1111 1111. ******** // The Sub-code mask is a 32-bit binary system.

255.255.255.x // decimal representation

The correct mask can only be an available IP Address

0 (0 ~ 255)
128 = 128 255-128 = <127 -- 0> // 192.168.1. (0 ~ 127)
128 + 64 = 192 255-192 = <63 -- 0>
128 + 64 + 32 = 224 255-224 = <31 -- 0>
128 + 64 + 32 + 16 = 240 255-240 = <15 -- 0>
128 + 64 + 32 + 16 + 8 = 248 255-248 = <7 -- 0>
128 + 64 + 32 + 16 + 8 + 4 = 252 255-252 = <3 -- 0>
128 + 64 + 32 + 16 + 8 + 4 + 2 = 254 255-254 = <1 -- 0>
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 255-255 = <0 -- 0>
-------------------------------------------------------------

Related Article

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.