Menu
Coddy logo textTech

Reading CIDR

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

CIDR notation is just address/prefix, and the prefix carries two numbers at once: /n means n network bits and 32 - n host bits.

So /26 is 26 network bits and 6 host bits. /12 is 12 network bits and 20 host bits. The host-bit count is the number you will use most, because it decides how many machines fit.

Whenever you see a slash, compute both numbers reflexively. It takes a second and it unlocks everything that follows.

challenge icon

Challenge

Beginner

For /26 and then /12, print the number of network bits and the number of host bits, each on its own line. Four lines total.

Expected output:

26
6
12
20

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground