Subnet mask

From Linuxintro

A subnet mask is a way to define a range of IP addresses.

A network can be defined like this:

192.168.0.1/24

In this case we have an IP address, 192.168.0.1, and a subnet mask, the first 24 bits of the IP address. As every number consists of 8 bits, the first 24 bits are the first three numbers in the IP address. This means, every IP address that starts with 192.168.0 is part of this network.