Your IP address allows you to calculate the mask (dotted decimal), subnet address, broadcast address.

Your IP address allows you to calculate the mask (dotted decimal), subnet address, broadcast address.

To calculate the mask as IP address, subnet address, broadcast address, you have to keep in mind a few points. 1: IP address (ABC three) belonging to the address class. Class A address mask 8, 16-bit address Class B, Class C addresses 24.

2: binary and decimal conversion remember (128,64,32,16,8,4,2,1).

3: You know you want to know digital ABC class address is. 0-126 Class A / B classes 192-223 128-191 / C. Can not remember wrong.

We start talking about binary arithmetic, for example: Binary 192 is how much? In fact, remember to say above binary and decimal conversion of I (128,64,32,16,8,4,2,1) you can pick out.

Can we look at 192 minus 128? Then it is possible to reduce the 128 1, can not be reduced is if 0

192-128 = 64, we look at the number 128 in the back can be reduced 64 to be cut is 1, 0 is not cut and so on.

Binary number represents only 1 and 0. So 192 is binary: 11000000 (binary)

Binary count (0-255) as long as you remember I said above those we used to go to school when the teacher taught us so much trouble and then the number of operations is actually very simple, do not want to.

We say it computes the IP address mask, subnet address, broadcast address:

For example: 131.108.45.148/17

/ 17 represents the mask address, we look at the beginning of the 131 IP addresses that belong to the class B address (128-191) 16, that is, let us calculate 131.108.45.148 45 is what we're looking for a mask, subnet and broadcast addresses. But now we look at the first class B address 16 is 17, we would like to take a

Class B addresses 11111111.11111111.000000.000 16

When we borrow, it becomes 11111111.11111111.10000000.00000000 which is now a binary mask, as long as we do not use the same set of binary conversion to decimal can be drawn on the mask, we do not see the same set of 10 million you 8 can put the number as 1286432168421 you will find the corresponding lower as long as the number 1 corresponds to become that I said that adding a few numbers I said above, is our cover code 10000000 is 12.8 billion, then we mask is 255.255.128.0

Note: As long as the number 1 changes from 0 added, must take the number of those who say I remember you imagine IP address is a 32-bit binary, each section is divided into 4 sections 8 digits and the number of those who, like I said, 8 are the number of bits, as long as the cross-references can be quickly calculated

We say it is the subnet address and broadcast address, class B is 16 now we are / 17, to say that we want a class B address borrowed one, remember that a few times by several parties of 2, we this is equal to the power of 2 1 2. we all know the IP address of each segment digit is 0-255 256, it is equal to a few two-by-256? It is not 2 * 128 = 256 128 this is what we use it to help us divide the subnet address and broadcast address. First 131.108.0.0 (subnet address) -131.108.127.255 (broadcast address) 131.108.128.0 (subnet address) -131.108.256.255 (broadcast address) This is what we work out the subnet address and broadcast address, then I look see our IP is 138.108.128.48, it means that our IP is between 138.108.0.0-138.108.127.255, so the answer is the subnet address: 138.108.0.0 broadcast address:. 138.108.127.255 their midst address is our host address.

That's my understanding there is something wrong place wrong place please put forward, thank you! ~!

Guess you like

Origin blog.51cto.com/14557584/2442137