Working out the range of addresses for a given IP/ subnet mask pair.

 

Let us use the following address:

192.168.100.0 /22

 

Part of the address is to denote the network, the rest is to denote the host(s).

 

Key

blue = network

Red = host

Firstly rewrite the address as binary – use a calculator if you need to. Then write the subnet mask below the IP address.

 

IP address        11000000.10101000.01100100.00000000

Subnet Mask   11111111.11111111.11111100.00000000

To obtain the last address on the network, substitute the last 10 bits (in red) for 1s. Now convert back to decimal.

Last address    11000000.10101000.01100111.11111111

Decimal          192.                 168.         103.         255

 

We can now see that 192.168.100.0 /22 runs from

 

192.168.100.0 to 192.168.103.255

 

 

 

 

 

 

 

 

Note that this table relates to the address range above only

SM

/22

/23

/24

/25

/26

/27

/28

/29

/30

Host bits

10

9

8

7

6

5

4

3

2

Number of networks

Available for 192.168.100.0 /22

 

1

2

4

8

16

32

64

128

256