-1

So we have a private network:

172.16.0.0/12

that means:

10101100.00010000.00000000.00000000 (value: 172.16.0.0)
11111111.11110000.00000000.00000000 (subnet mask of /12)

How does that translate to the: 172.16.0.0 -- 172.31.255.255 range? Based on the subnet mask, if I understand it correctly, it should be 172.0.255.255 -- 172.15.255.255. Where does 31 come from?

MadHatter
  • 81,580
pypipy
  • 3

1 Answers1

2

As the netmask denotes the network part, you must invert it to get the host part.

So the host part of a /12 network is 000FFFFF or 00000000-000FFFFF. If you have a network 172.16.0.0 or AC100000, the low address is AC100000 | 00000000 and the high address is AC100000 | 000FFFFF

10101100.00010000.00000000.00000000 (low address, 172.16.0.0)
00000000.00001111.11111111.11111111 (host mask)
10101100.00011111.11111111.11111111 (high address, 172.31.255.255)
RalfFriedl
  • 3,258