Network number differs from sub-network number

Source: Internet
Author: User
Tags nets valid

Known ip:195.169.20.50 subnet mask: 255.255.255.224 to find the network cell number host number.

Answer: IP is Class C, one knows the subnet mask value is 224 so the network is divided into 8 subnets, The network number is the binary 11111111.11111111.11111111.00000000 that converts your IP into binary 11000011.10101001.00010100.00110010 and atomic netmask 255.255.255.0.110 The 00011.10101001.00010100.00000000 is converted to decimal 195.169.20.0 The subnet number is logical with the IP and the new subnet mask 255.255.255.224, and also to binary in with get 195.169.20.32 , the calculation of the host number is the new subnet mask 255.255.255.224 into the binary after the reverse, that is, 0 to 1, 1 to 0, and then the binary of the IP and the logic and operation to get the host number 0.0.0.18. Is the 18th number of the 195.169.20.32 network segment.



Known computer IP address 195.169.20.25, subnet mask is: 255.255.255.240, calculated to write out the machine's network number, subnet number, host number.

256-240=16 the number of subnet segments with 16. That is 0-15 16-31 32-47.
Where the first address is the subnet address, and the last one is the broadcast address. The active host is 14.
25 between 16-31 which subnet address is 195.169.20.16 Broadcast address is 195.169.20.31
The address range is: 195.169.20.17-195.169.20.30

The function of the mask is to tell the computer to divide the "big net" into how many "small nets"! Many books say that the mask is used to determine the IP address of the network number, to determine whether another IP is in the same subnet as the current IP. That's right, but it doesn't make much sense for us to do the problem. We need to be clear: the function of the mask is to tell the computer to divide the "big net" into how many "small nets"! Masks are the basis for determining the number of subnets.

The left part of the mask must be all 1 and no 0 in the middle will appear. Let's say 255.255.248.0 to Binary is 11111111.11111111.11111000.00000000, you can see the left is 1, in the middle of 1 No 0 appears (0 is on the right side of 1), this is a valid mask. Let's look at 254.255.248.0, and turn it into binary is 11111110.11111111.11111000.00000000, which is not a valid mask, because there is a 0 presence in the middle of 1.

Dividing a large Class C network into 4 subnets will increase the number of unusable IP addresses. Think of it this way: when the C-type big network does not draw the molecular net, there are two IP addresses are not available, now the Class C large network is divided into 4 subnets, then each subnet has 2 IP address is not available, so 4 subnets have 8 IP address is not available, with 8 IP addresses minus the subnet when the two unavailable IP address, The results are 6. Therefore, after dividing the large Class C network into 4 subnets, there will be 6 more unavailable IP addresses.

Let's say 202.117.12.36/30, we first convert/30 this alternative mask notation to our customary notation:  11111111.11111111.11111111.11111100, the conversion to decimal is 255.255.255.252. We can see that the left side of this mask is the same as the Class C default mask, and only the fourth section is different from the Class C default mask, so we think that the 255.255.255.252 mask is within the scope of the class C default mask, which means we will divide the class C network into subnets. Because the default mask for Class C networks is 255.255.255.0, converting the class C default mask to binary is 11111111.11111111.11111111.00000000, where 8 0 means that an IP address can be represented by a 8-bit binary number. That is to say that the Class C network can have 2 of the 8-time IP address, that is, 256 IP addresses. The last section of the mask in this question is 252, and the conversion to binary is 11111100, because 1 represents the network number, so 111111 means dividing the large Class C network into (111111) 2 into subnets. Converting 111111 to decimal is 64, so the Class C is divided into 64 subnets, the number of IP addresses per subnet is 256/64=4, the first IP address in the subnet that represents the subnet number is removed, and the last IP address that represents the broadcast address. The number of assignable IP addresses in the subnet is the total number of IP addresses in the subnet minus 2, which is 4-2 = 2.

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.