Menu
Coddy logo textTech

What a Mask Does

Lesson 10 of 46 in Coddy's IP Addressing and Subnetting course.

The slash tells humans where the network part ends. Machines use a subnet mask instead: 32 bits where every network bit is 1 and every host bit is 0.

For /24 the mask is 24 ones followed by 8 zeros. Written as octets, that is 255.255.255.0: three full bytes of ones (255 each) and one byte of zeros.

The ones always come first, with no gaps. 255.0.255.0 is not a legal mask; once the zeros start, they run to the end.

challenge icon

Challenge

Beginner

Print the mask 255.255.255.0 in binary, as four 8-bit octets joined by dots.

Expected output:

11111111.11111111.11111111.00000000

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground