Subnets

A subnet is a segment of an IP address space.

A subnet looks like the following:

CIDR notation10.20.0.0/24
Subnet mask255.255.255.0

Subnet Mask

The mask in this sense is like multiplying by 1 (aka this bit exists)


 00001010.00010100.00000000.00000000
 11111111.11111111.11111111.00000000 x
=00001010.00010100.00000000.00000000

So, in essence the first 3 bytes from the top IP address will always be the same, however, the subnet mask has no effect on the last byte.

From the CIDR notation, note the /24 at the end, this signifies 24 bits for the network prefix of the IP address, leaving 8 bits for the host identifier (32bits - 24bits).

In simpler terms, you could give a machine an ip address anywhere between 10.20.0.0 and 10.20.0.255.