What a Subnet Mask Does
Understand how a mask marks which bits are network and host.
The Mask in One Sentence
A subnet mask tells a device which part of an IP address is the network and which part is the host. It is a 32-bit number paired with every IPv4 address.
Without a mask, an address is ambiguous — the device would not know where the network ends and the host begins.
Ones and Zeros
In a mask, the bits set to 1 mark the network portion and the bits set to 0 mark the host portion. The 1 bits are always contiguous, starting from the left.
For example, 11111111.11111111.11111111.00000000 has 24 ones then 8 zeros, meaning the first three octets are network and the last is host.
11111111.11111111.11111111.00000000
= 255.255.255.0All lessons in this course
- What a Subnet Mask Does
- Reading CIDR Slash Notation
- Counting Hosts in a Subnet
- Splitting a Network Into Subnets