Keep only the ideas we need
From routing to the address boundary
Routing tables describe destinations as networks. That is why an IPv4 address needs a network portion and a host portion. This first section is deliberately short: it connects the lecture to the subnetting activity without repeating earlier switching, ARP or encapsulation lessons.
Three statements to carry into subnetting
Read these before moving on. If they make sense, subnetting becomes much less mysterious.
Special addresses still follow the same rule
The host portion gives several addresses special meanings.
Host bits all 0
Identifies the network itself. For 192.168.6.0/24, the network address is 192.168.6.0.
Host bits all 1
Targets every host in that IP network. For 192.168.6.0/24, it is 192.168.6.255.
Startup source
Used in the lecture example when a host does not yet have an IP address.
Loopback
Sends traffic back to the same computer for local testing.
See the split before calculating anything
Move the network/host boundary in both directions
The 32 boxes below are the 32 bits of one IPv4 address. Moving the boundary right borrows host bits to create more, smaller networks. Moving it left gives network bits back to the host portion to support more devices in one larger network.
Start simple: /8, /16 and /24
These boundaries fall between octets. Click each one and watch which bits belong to the network.
Now move inside the last octet
Network perspective: starting with a /24 network, move towards /30. Every step borrows one more host bit to create more, smaller subnets.
Drag the slider, use the arrow keys, or choose a prefix directly.
Now move the other way: make room for 260 hosts
Host perspective: a /24 supports only 254 usable hosts, so 260 devices will not fit. Instead of jumping to an oversized /16, shorten the prefix and give network bits back to the host portion.
Start at /24, then choose /23, /22, /21 or /20. Moving left by one prefix step doubles the total address capacity.
Address range containing 192.168.6.0
| Prefix | Network bits given back | Host bits | Usable hosts | Meaning for 260 hosts |
|---|---|---|---|---|
| /24 | 0 | 8 | 254 | Too small by 6 |
| /23 | 1 | 9 | 510 | Smallest prefix here that fits |
| /22 | 2 | 10 | 1,022 | Fits, but leaves more spare capacity |
| /20 | 4 | 12 | 4,094 | Fits, but is much larger than required |
| /16 | 8 | 16 | 65,534 | Oversized comparison; modern CIDR does not require this jump |
Construct the pattern one bit at a time
Subnet playground
You begin with one network containing 256 addresses. Each time you borrow a host bit you create twice as many networks, each half the size. Work one bit at a time and predict the result before you see it.
Move the boundary deliberately
Borrow one bit at a time, or choose a prefix directly once the pattern is clear.
Borrow one more bit is unavailable at /30 because /30 is the final prefix used in this lesson.
Give one bit back is unavailable at /24 because /24 is the starting prefix used in this section.
Check yourself before moving on
Let the picture lead the calculation
Find the subnet containing a host
Choose a final octet and prefix. Then step through the method. The animation shows the mask, block size, equal ranges and finally the exact subnet containing the host.
Worked example generator
Try values such as 77/26, 145/27 or 210/28. You are exploring, not being graded.
Choose a size that fits the devices
Plan a subnet by host requirement
Subnetting is a design decision. If a network needs only a few devices, reserving 254 usable host addresses may be unnecessary. Use the slider to see the smallest /24–/30 subnet that can hold the selected number of hosts.
How many hosts do you need?
This tool recommends the smallest subnet within the range covered by this lesson. It explains the result rather than testing you.
Devices to accommodate
Each dot represents one required host until the display becomes too crowded; the number above is the real requirement.
Why routers care about prefixes
The same notation used in subnetting also appears in routing tables.
A routing-table entry like this describes a whole destination network. A router does not need a separate entry for .65, .66, .67 and every other host in that range.
Keep the mental model
Prefix: where the network boundary sits.
Subnet: one address range created by that boundary.
Network address: first address in the range.
Broadcast: last address in the range.
Usable hosts: addresses between those boundaries.