/20 subnet mask (255.255.240.0)
A /20 is the subnet mask 255.255.240.0: 20 network bits and 12 host bits, giving 4,096 addresses and 4,094 usable hosts. Its wildcard mask is 0.0.15.255 and its block size is 16.
- Subnet mask
- 255.255.240.0
- Wildcard
- 0.0.15.255
- Addresses
- 4,096
- Usable hosts
- 4,094
- Block size
- 16
The /20 mask in binary
The prefix is the number of 1 bits at the start of the mask. Ones mark the network part of an address, zeros the host part.
11111111.11111111.11110000.00000000
20 network bits, 12 host bits.
Every /20 in 172.16.0.0/16
A /16 holds 16 /20 subnets, each starting where the previous one ends.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 172.16.0.0/20 | 172.16.0.1 | 172.16.15.254 | 172.16.15.255 |
| 172.16.16.0/20 | 172.16.16.1 | 172.16.31.254 | 172.16.31.255 |
| 172.16.32.0/20 | 172.16.32.1 | 172.16.47.254 | 172.16.47.255 |
| 172.16.48.0/20 | 172.16.48.1 | 172.16.63.254 | 172.16.63.255 |
| 172.16.64.0/20 | 172.16.64.1 | 172.16.79.254 | 172.16.79.255 |
| 172.16.80.0/20 | 172.16.80.1 | 172.16.95.254 | 172.16.95.255 |
| 172.16.96.0/20 | 172.16.96.1 | 172.16.111.254 | 172.16.111.255 |
| 172.16.112.0/20 | 172.16.112.1 | 172.16.127.254 | 172.16.127.255 |
| 172.16.128.0/20 | 172.16.128.1 | 172.16.143.254 | 172.16.143.255 |
| 172.16.144.0/20 | 172.16.144.1 | 172.16.159.254 | 172.16.159.255 |
| 172.16.160.0/20 | 172.16.160.1 | 172.16.175.254 | 172.16.175.255 |
| 172.16.176.0/20 | 172.16.176.1 | 172.16.191.254 | 172.16.191.255 |
| 172.16.192.0/20 | 172.16.192.1 | 172.16.207.254 | 172.16.207.255 |
| 172.16.208.0/20 | 172.16.208.1 | 172.16.223.254 | 172.16.223.255 |
| 172.16.224.0/20 | 172.16.224.1 | 172.16.239.254 | 172.16.239.255 |
| 172.16.240.0/20 | 172.16.240.1 | 172.16.255.254 | 172.16.255.255 |
Where a /20 is used
Every default VPC in AWS is 172.31.0.0/16 with a /20 default subnet in each Availability Zone, so a /20 (4,091 usable addresses in AWS) is the size many people meet first.
On premises, a /20 summarises sixteen /24 networks into one route, which is how it appears in CCNA route summarisation questions.
| Where | Usable addresses |
|---|---|
| Ordinary network | 4,094 |
| AWS VPC subnet (5 reserved) | 4,091 |
| Azure subnet (5 reserved) | 4,091 |
Worked example: 172.16.45.9/20
The block-size method, the way you would do it in an exam without a calculator.
- /20 means a mask of 255.255.240.0.
- The interesting octet is the third one, where the mask is 240. Block size = 256 − 240 = 16.
- Subnets in that octet start at multiples of 16. 45 falls in the block from 32 to 47.
- Network address = 172.16.32.0; broadcast = the next block minus one = 172.16.47.255.
- Usable hosts run from the network plus one to the broadcast minus one: 172.16.32.1 to 172.16.47.254, which is 2^12 − 2 = 4,094 addresses.
Try another address in the subnet calculator, or practise without one on the subnetting practice questions.