SaveMyCert
IPv4 reference

/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.

/20 subnets of 172.16.0.0/16
NetworkFirst hostLast hostBroadcast
172.16.0.0/20172.16.0.1172.16.15.254172.16.15.255
172.16.16.0/20172.16.16.1172.16.31.254172.16.31.255
172.16.32.0/20172.16.32.1172.16.47.254172.16.47.255
172.16.48.0/20172.16.48.1172.16.63.254172.16.63.255
172.16.64.0/20172.16.64.1172.16.79.254172.16.79.255
172.16.80.0/20172.16.80.1172.16.95.254172.16.95.255
172.16.96.0/20172.16.96.1172.16.111.254172.16.111.255
172.16.112.0/20172.16.112.1172.16.127.254172.16.127.255
172.16.128.0/20172.16.128.1172.16.143.254172.16.143.255
172.16.144.0/20172.16.144.1172.16.159.254172.16.159.255
172.16.160.0/20172.16.160.1172.16.175.254172.16.175.255
172.16.176.0/20172.16.176.1172.16.191.254172.16.191.255
172.16.192.0/20172.16.192.1172.16.207.254172.16.207.255
172.16.208.0/20172.16.208.1172.16.223.254172.16.223.255
172.16.224.0/20172.16.224.1172.16.239.254172.16.239.255
172.16.240.0/20172.16.240.1172.16.255.254172.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.

Usable addresses in a /20
WhereUsable addresses
Ordinary network4,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.

  1. /20 means a mask of 255.255.240.0.
  2. The interesting octet is the third one, where the mask is 240. Block size = 256 − 240 = 16.
  3. Subnets in that octet start at multiples of 16. 45 falls in the block from 32 to 47.
  4. Network address = 172.16.32.0; broadcast = the next block minus one = 172.16.47.255.
  5. 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.

/20 subnet mask: your questions

The subnet mask for /20 is 255.255.240.0. The prefix counts the 1 bits in the mask: 11111111.11111111.11110000.00000000 has 20 ones. The wildcard mask, used in Cisco ACLs and OSPF, is 0.0.15.255.

Other prefixes