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
BeginnerFor /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
20Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the PlanPractice on your own: Terminal playground