[Reprinted] a method that easily calculates the subnet mask

Source: Internet
Author: User
Many people are certainly not familiar with the subnet mask setting, which is a headache. Now I will tell you how to easily calculate the subnet mask and help people who like to be lazy :)

Everyone should know how many hosts are between the power 0 and the power 10 of 2? Let us also say that they are:
1 2 4 8 16 32 64 128 256 512 1024.

If you want only five IP addresses in each subnet to be available to the machine, you need to prepare at least seven IP addresses for each subnet, because you need to add two unavailable network and broadcast IP addresses, You need to select the nearest one, that is, eight, that is, select eight IP addresses for each subnet. Well, in this step, you can calculate the mask. This method is: The last mask is 256 minus the number of IP addresses required by each subnet, in this example, the IP address is 256-8 = 248. Then, you can find out which IP addresses are unavailable: 0-7, 8-15, 16--31 and so on) they are all unavailable. You should use the IP address between two digits, which is an available IP address of a subnet. Why? Don't believe it? It's too simple...

Let me try again. Let's take the 200 machines into 4 sub-networks for example.
There are 200 machines and 4 subnets. Each subnet has 50 machines and is set to 192.168.10.0 and class c ip addresses. The large Subnet Mask should be 255.255.255.0, but we need a molecular network, so according to the above, we use 32 IP addresses and one sub-network is not enough. We should use 64 IP addresses for each subnet (62 of them are available, enough), and then use my method: the subnet mask should be 256-64 = 192, so the total subnet mask should be: 255.255.255.192. Don't believe it? Calculation: 0-63,64-127,128-191,192-255, so that you can set the four regions to the machines in the four subnets respectively, isn't it easy? You don't need software... Haha .. I hope you can understand what I wrote ....

It's really good: the method and simplicity are much faster than the old method.

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.