A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Subnetting and CIDR Notation

Graduate Depth 80 in the knowledge graph I know this Set as goal
52topics build on this
336prerequisites beneath it
See this on the map →
IPv4 Addressing and Address ClassesBinary Arithmetic+1 moreIP Routing and ForwardingRoute Aggregation and Supernetting
subnet cidr address-aggregation prefix-length

Core Idea

Subnetting divides an IP address space into smaller networks by using a subnet mask to separate the network portion from the host portion. CIDR notation (e.g., 192.168.1.0/24) compactly represents a network and its prefix length, replacing older classful addressing and enabling efficient address allocation and routing.

How It's Best Learned

Practice subnetting exercises: given a network and required number of subnets, determine subnet masks and address ranges; verify with online calculators.

Common Misconceptions

Explainer

From your understanding of IPv4 addressing, you know that every device on a network has a 32-bit IP address written in dotted-decimal form (like 192.168.1.50). But an IP address alone does not tell you which part identifies the network and which part identifies the specific host on that network. That is the job of the subnet mask — a 32-bit value where the leading 1-bits mark the network portion and the trailing 0-bits mark the host portion. For example, the mask 255.255.255.0 in binary is 24 ones followed by 8 zeros, meaning the first 24 bits are the network address and the last 8 bits identify hosts within that network.

CIDR notation (Classless Inter-Domain Routing) expresses this compactly by appending a slash and the number of network bits: 192.168.1.0/24 means "the network where the first 24 bits are fixed (192.168.1) and the remaining 8 bits vary." The /24 is called the prefix length. A /24 network has 2⁸ = 256 addresses (254 usable, since the all-zeros address identifies the network and the all-ones address is the broadcast). A /25 splits that in half — 128 addresses each — and a /16 gives you 65,536 addresses. Your binary arithmetic background is directly useful here: every additional prefix bit halves the number of available host addresses, and every bit removed doubles it.

Subnetting is the practice of taking a network and dividing it into smaller subnetworks. Suppose your organization is assigned 10.0.0.0/16 (65,534 usable hosts). You do not want all 65,534 devices on one broadcast domain — that would be chaos. Instead, you subnet: divide /16 into 256 /24 subnets (10.0.0.0/24, 10.0.1.0/24, ..., 10.0.255.0/24), each with 254 hosts. Or divide it into 16 /20 subnets if departments need more hosts per subnet. The process always involves borrowing bits from the host portion to create a longer network prefix.

CIDR replaced the original classful addressing system that rigidly divided addresses into Class A (/8), Class B (/16), and Class C (/24) networks. Classful addressing was enormously wasteful — an organization that needed 300 addresses had to receive a Class B with 65,534, wasting over 99%. CIDR allows a prefix of any length, so that organization could receive a /23 (510 usable addresses) — just enough, with minimal waste. This flexibility also enables route aggregation: instead of advertising hundreds of individual /24 routes, a router can advertise a single /16 that covers all of them, keeping global routing tables small. Subnetting and CIDR are the tools that made the IPv4 address space last decades longer than it otherwise would have.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticSubnetting and CIDR Notation

Longest path: 81 steps · 336 total prerequisite topics

Prerequisites (3)

Leads To (2)