192.168.0.1/16,1/24;192.168.1.1/16,1/24 the meaning of the IP segment

Source: Internet
Author: User



First, let's look at the conversion knowledge of the binary:



Binary number converted to decimal number binary 1101 converted to decimal
1101 (2) =1*2^0+0*2^1+1*2^2+1*2^3=1+0+4+8=13
Converted to decimal to the right-to-left with the binary of each number to be multiplied by 2 of the corresponding sub-square
But the second is going to start at 0.
Instead, divide the decimal 13 by 2, and each of the remainder is recorded next to it.
Finally, the remainder is ranked from the bottom up to get 1101
Decimal Turn binary:
Divide by 2 to the result of 1
To write the remainder and the last 1 backwards from the bottom up is the result.
For example 302
302/2 = 151 more than 0
151/2 = 75 more than 1
75/2 = 37 more than 1
37/2 = 18 more than 1
18/2 = 9 more than 0
9/2 = 4 more than 1
4/2 = 2 more than 0
2/2 = 1 more than 0
1/2 = 0 More than 1
So the binary is 100101110



Let's understand the general [object Object] expression [object Object] formula:
 
[object Object] [object Object] area [object Object] network [object Object] [object Object] [object Object] [object Object] [object Object] [object Object] netmask: 0-255 A total of 256 binary representation of [object Object] 11111111 of 8 [object Object] 1
[object Object] net [object Object] [object Object] [object Object] The four sections are 255.255.255.255 = 11111111.11111111.11111111.11111111111 = 32 [object Object] 1
 
Class C 255.255.255.0 = 11111111.11111111.11111111.00000000 = 24 [object Object] 1
Class B 255.255.0.0 = 11111111.11111111.00000000.00000000 = 16 [object Object] 1
Class A 255.0.0.0 = 11111111.00000000.00000000.00000000 = 8 [object Object] 1
 
[object Object] To write the switch policy [object Object] [object Object] use [object Object] [object Object] [object Object]: inverted mask
255.255.255.0 = 0.0.0.255
255.255.0.0 = 0.0.255.255
255.255.255.0 = 0.255.255.255

192.168.0.1/16, 1/24 192.168.1.1/16, 1/24



The number of digits of the subnet mask. The subnet mask is calculated by 32 bits, and the number of writes is 1, and the other digits are all 0 .



192.168.0.1/16;192.168.1.1/16 that corresponds to 11111111 11111111 00000000 00000000 converted to decimal is 255.255.0.0 is also the IP 192.168 fixed



192.168.0.1/24;192.168.1.1/24 is for 11111111 11111111 11111111 000000000 Convert to Decimal is 255.255.255.0 is also the IP 192.168.0/1 fixed






192.168.0.0/24 means that the network code occupies 24 bits, that is, the network can have 254 host (2^8-2) IP range: 192.168.0.1~192.168.0.254 192.168.0.255 is the broadcast address, can not be used by the host. When setting the IP address: 192.168.0.x subnet Mask: 255.255.255.0 192.168.0.0/16 indicates that the network code occupies 16 bits, which means that there can be 65,534 host (2^16-2) IP range on the network: 192.168.0.1~ 192.168.255.254 192.168.255.255 is a broadcast address and cannot be used by a host. When setting the IP address: 192.168.x.y Subnet Mask: 255.255.0.0









This article is from the Linux system Learning extension blog, so be sure to keep this source http://zhangxiaoxiong.blog.51cto.com/11657691/1789710



192.168.0.1/16,1/24;192.168.1.1/16,1/24 the meaning of the IP segment


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.