Week 7 · Lesson 1

Why Subnet? (Subnetting Basics)

Subnetting is the arithmetic core of the CCNA. Before you can split a network, you must see an IPv4 address as it really is: 32 bits divided into a network part and a host part. This lesson builds that picture and defines the four addresses every subnet owns.

CCNA 200-301 Domain 1.7 IPv4 Addressing Verified 2026-10-11
Part 1

Why subnet at all?

An organisation rarely gets to keep one giant, flat network. Subnetting is the practice of taking one assigned IP network and dividing it into smaller logical networks called subnets. There are three reasons people do it, and every exam question about subnetting ultimately traces back to one of them.

Definition — subnet. A subnet is a logical subdivision of a single IP network. All devices in one subnet share the same network address and the same subnet mask, and can reach each other without a router.

Devices in different subnets need a router to communicate. That single sentence is why subnetting matters to a network engineer: it decides where router boundaries must be.

Why subnet? · pick a reason to see the effect
One flat subnet PC PC PC PC PC PC PC PC 1 broadcast domain · all 8 interrupted Subnet A PC PC PC PC Subnet B PC PC PC PC 2 broadcast domains · only 4 interrupted each

Part 2

The three-step mental model

Every subnetting calculation in this course uses the same three-step model. Learn it now and you never need to memorise a special case again.

  1. Write the prefix. The prefix length tells you how many leading bits are the network bits. A “/24” has 24 network bits.
  2. Count the host bits. Host bits are whatever is left: host bits = 32 − prefix. A /24 therefore has 32 − 24 = 8 host bits.
  3. Split the 32-bit address. The first prefix bits identify the subnet; the remaining host bits identify a device inside it.

Consider the address 192.168.10.130 with prefix /24. Written in binary, the address is 11000000.10101000.00001010.10000010. The first 24 bits are the network part; the final 8 bits 10000010 are the host part. Change a network bit and you are in a different subnet. Change a host bit and you stay in the same subnet but move to a different device.

Network bits vs host bits · pick a prefix

Part 3

What a subnet mask really marks

A subnet mask is a 32-bit number that sits beside every IPv4 address. Its only job is to mark which bits belong to the network and which belong to the host.

Masks are always a run of 1s followed by a run of 0s — never a 1 after a 0. The mask 255.255.255.192 is 11111111.11111111.11111111.11000000: twenty-six 1s and six 0s. That is why a mask can always be written as a simple prefix length (the count of 1s) instead of four numbers.

Calculation trick. To read a mask octet, add the bit values from the left: 128, 64, 32, 16, 8, 4, 2, 1. 11000000 = 128 + 64 = 192; 11100000 = 128 + 64 + 32 = 224. Being able to do this in your head turns every mask question into a two-second lookup.
Prefix ↔ dotted-decimal · convert either way

Part 4

Prefix and dotted notation

These are two ways of writing the same mask. A /26 and 255.255.255.192 are identical; the exam will mix the two freely, so you must convert instantly.

PrefixDotted-decimal maskHost bits (32 − prefix)Addresses per subnet (2h)
/24255.255.255.08256
/25255.255.255.1287128
/26255.255.255.192664
/27255.255.255.224532
/28255.255.255.240416
/29255.255.255.24838
/30255.255.255.25224
Exam tip. The last octet of the mask is the only one that moves for prefixes /25–/30 inside a classful /24. Memorise this ladder once: 128, 192, 224, 240, 248, 252 corresponds to /25, /26, /27, /28, /29, /30. If you can recite it, half the subnetting questions on the exam are already solved.

Every number in subnetting is a power of two. Keep this table in your head: 20=1, 21=2, 22=4, 23=8, 24=16, 25=32, 26=64, 27=128, 28=256, 29=512, 210=1,024, 211=2,048, 212=4,096, 216=65,536, 224=16,777,216.

Part 5

The four key addresses

Every subnet, no matter its size, owns exactly four addresses that you must be able to name. Two are reserved and two are usable.

AddressRuleCan a host use it?
Network addressall host bits set to 0No — names the subnet
First usablenetwork address + 1Yes
Last usablebroadcast address − 1Yes
Broadcast addressall host bits set to 1No — reaches every host
Definition — usable hosts. For a subnet with h host bits, usable hosts = 2h − 2. The subtraction of 2 removes the network address (host bits all 0) and the broadcast address (host bits all 1), neither of which can be assigned to a device.

That “− 2” is not a convention you can skip. If a question asks how many hosts a subnet supports, the answer is always 2h − 2; if it asks how many addresses the subnet contains, the answer is 2h. Read the wording carefully.

The four key addresses · move the prefix slider
/24

Worked example: a /24

Take the network 192.168.10.0/24. Follow the three-step model and find all four key addresses.

Network:        192.168.10.0      /24  ->  mask 255.255.255.0
Host bits:      32 − 24 = 8
Addresses:      2^8 = 256
Usable hosts:   2^8 − 2 = 254

Network address:   192.168.10.0     (host bits all 0)
First usable:      192.168.10.1     (network + 1)
Last usable:       192.168.10.254   (broadcast − 1)
Broadcast:         192.168.10.255   (host bits all 1)

Check: usable count = 254 − 1 + 1 = 254   OK

Notice the arithmetic that proves the answer: the usable range runs from .1 to .254 inclusive, which is 254 − 1 + 1 = 254 addresses. Whenever a worked example does not reconcile, you have made an error — the count is your built-in checksum.

Now shrink the same network to /26 to preview where the course is going. A /26 has 32 − 26 = 6 host bits, so 26 = 64 addresses and 64 − 2 = 62 usable hosts. The block size in the last octet is 256 − 192 = 64, giving subnets at .0, .64, .128 and .192. The subnet containing 192.168.10.0 is itself: network 192.168.10.0, broadcast 192.168.10.63, usable .1 to .62. Lessons 2 and 3 turn this preview into a repeatable method.

Remember. The phrase “host bits all 0 = network, host bits all 1 = broadcast” is the single most useful sentence in subnetting. Every network, first-usable, last-usable, and broadcast address you will ever compute is a direct consequence of it.
Part 6

Key terms & sources

Subnet

A logical subdivision of one IP network, sharing a network address and mask.

Network bits

The leading bits of an IPv4 address that identify the subnet; count = the prefix length.

Host bits

The remaining bits that identify a device within the subnet; count = 32 − prefix.

Subnet mask

A 32-bit value with 1s over network bits and 0s over host bits.

Prefix length

The count of 1s in the mask, written /n (e.g. /26).

Network address

The address with all host bits 0; names the subnet and is not assignable.

Broadcast address

The address with all host bits 1; reaches all hosts and is not assignable.

Usable hosts

Addresses a device may take: 2h − 2, where h = host bits.

  1. Fuller, V. & Li, T. RFC 4632: Classless Inter-Domain Routing (CIDR) (2006), Section 3 (prefix notation and masks). rfc-editor.org/rfc/rfc4632.
  2. Pummill, R. & Manning, B. RFC 1878: Variable Length Subnet Table For IPv4 (1995) (usable host counts per mask). rfc-editor.org/rfc/rfc1878.
  3. Cisco. CCNA (200-301) Exam Topics, IP Connectivity / IPv4 Addressing and Subnetting. cisco.com.
Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.