What Is The Subnet Mask Of /24
What Is the Subnet Mask of /24: A Practical Guide to CIDR Notation
You're setting up a small office network. Maybe you're configuring a router, assigning IP addresses to devices, or just trying to understand why your friend's IT guy keeps muttering "/24" under his breath like it's some kind of spell.
Here's the thing — once you see what /24 actually means, it clicks. And it doesn't click because it's complicated. It clicks because it's elegant. A /24 subnet mask is just a way of saying "give me 24 bits for the network, which leaves 8 bits for everything else." That's it.
Let's dig into what that actually looks like, why it matters, and how to work with it without wanting to throw your laptop out the window.
What Does /24 Actually Mean?
When someone says "/24," they're using CIDR notation — Classless Inter-Domain Routing. It's a shorthand way of describing how many bits in an IP address are reserved for the network portion.
An IPv4 address has 32 bits total. So /24 means 24 of those 32 bits identify the network, and the remaining 8 bits identify devices (hosts) within that network.
The subnet mask looks like this in dotted decimal notation: 255.255.255.0
You can write it a few ways:
- CIDR: /24
- Dotted decimal: 255.255.255.0
- Binary: 11111111.11111111.11111111.00000000
The three 255s represent the 24 bits (8 + 8 + 8 = 24). The final 0 means those last 8 bits are available for host addresses.
How Many Addresses Does a /24 Give You?
Here's where it gets practical. A /24 subnet has 256 total IP addresses in theory. But you don't get to use all of them.
Two addresses are reserved:
- The network address — the first one (e.g., 192.168.1.0) — identifies the network itself
- The broadcast address — the last one (e.g., 192.168.1.255) — sends a message to every device on the network
That leaves 254 usable addresses for computers, phones, printers, smart devices, and anything else that needs an IP.
If you're setting up a home network or a small office, 254 devices is probably more than enough. Most consumer routers default to /24 for exactly this reason.
/24 vs. Other Common Subnet Masks
You don't have to use /24 every time. Networks come in different sizes, and CIDR gives you flexibility.
| CIDR | Subnet Mask | Total IPs | Usable Hosts | Typical Use Case |
|---|---|---|---|---|
| /16 | 255.In practice, 255. 0.0 | 65,536 | 65,534 | Large campuses, enterprises |
| /24 | 255.That said, 255. Still, 255. 0 | 256 | 254 | Small offices, home networks |
| /25 | 255.255.255.128 | 128 | 126 | Growing small teams |
| /26 | 255.Even so, 255. Still, 255. That's why 192 | 64 | 62 | Department-level networks |
| /30 | 255. 255.255. |
The math is straightforward once you see the pattern: every time you decrease the CIDR number by one, you double the available addresses. Every time you increase it by one, you halve them.
Why Does the /24 Subnet Mask Matter?
You might be thinking — fine, it's a number. Why should I care?
Here's why: knowing your subnet mask determines what devices can talk to each other directly, and what has to go through a router.
Devices on the same subnet can communicate without any extra equipment. Practically speaking, they just broadcast to each other. Devices on different subnets need a router to mediate — the router has to sit at the intersection of the two networks and forward traffic.
If you set up a /24 network at 192.168.Even so, 1. Worth adding: 168. 1.Day to day, 168. 254 can talk to each other directly. Here's the thing — 1. On top of that, 50 can chat with your laptop at 192. Plus, 1. 1.In practice, 1 and 192. 0, every device with an IP between 192.Day to day, 168. Your printer at 192.Now, 168. 100 without anything in between.
But if you have a device at 192.168.2.Still, 50, that's a different subnet — it can't directly reach your 192. On the flip side, 168. 1.x devices. You need routing between them.
This isn't just theoretical. Mismatch your subnet mask and you'll spend hours troubleshooting why two computers "can't see each other" even though the IP addresses look right. The mask tells the device how to figure out whether another IP is on the same network or not.
Real-World Example: Home Network Setup
Say you get a router from your internet provider. 168.It hands out addresses in the 192.255.Even so, 1. 255.In practice, x range with a /24 mask (255. 0).
- Your laptop (192.168.1.10)
- Your phone (192.168.1.11)
- A smart TV (192.168.1.12)
- A NAS drive (192.168.1.13)
All of these are on the same /24 subnet. They can all communicate, share files, stream content to each other — no problem.
Now say you want to add a guest network. Worth adding: your guest devices are on a different subnet than your main network. 2.That's why they can access the internet through the router, but they can't directly reach your laptop or NAS. 0/24. 168.That said, you could set it up as 192. That's intentional — it keeps your local devices more isolated from unknown guests.
How to Calculate Subnet Details for /24
You don't need a calculator for basic stuff, but knowing how the math works helps when things get more complex.
Finding the Network Address
Take any IP in the subnet and apply a bitwise AND operation with the subnet mask.
Say your IP is 192.168.1.Plus, 47 and your mask is 255. 255.255.Now, 0. 255 in binary is 11111111. So ANDing with 255 means "keep the original number.Worth adding: " 0 in binary is 00000000. ANDing with 0 means "result is always 0.
So the first three octets stay the same. The last octet becomes 0.
Network address: 192.168.1.0
Finding the Broadcast Address
Flip all the host bits to 1. In a /24, the host portion is the last 8 bits.
Take the network address 192
Take the network address 192.168.Here's the thing — 1. 0 and flip the host bits to 1. In a /24, the host portion is the last octet, so setting it to 255 gives the broadcast address 192.168.In real terms, 1. 255. Consider this: this leaves the range 192. 168.This leads to 1. That said, 1 – 192. Consider this: 168. 1.254 for actual devices – 254 usable hosts in a block of 256 addresses.
Generalizing
Generalizing Beyond /24
The same bitwise logic that uncovers the network and broadcast addresses for a /24 applies to any CIDR prefix. The only difference is how many octets fall into the host portion.
| Prefix | Host bits | Total addresses | Usable hosts | Typical use case |
|---|---|---|---|---|
| /16 | 16 | 65 536 | 65 534 | Large campus or ISP block |
| /20 | 12 | 4 096 | 4 094 | Medium‑size office with several VLANs |
| /24 | 8 | 256 | 254 | Typical LAN segment |
| /25 | 7 | 128 | 126 | Small office with a handful of servers |
| /26 | 6 | 64 | 62 | Sub‑department or a Wi‑Fi SSID |
| /27 | 5 | 32 | 30 | Workgroup or point‑to‑point link cluster |
| /28 | 4 | 16 | 14 | Small server cluster, IoT segment |
| /29 | 3 | 8 | 6 | Point‑to‑point WAN links (e.g., PPP, GRE) |
| /30 | 2 | 4 | 2 | Point‑to‑point links between routers |
The formula stays the same:
[ \text{Usable hosts} = 2^{(32-\text{prefix})} - 2 ]
(Subtract 2 because the first address is the network identifier and the last is the broadcast.)
Quick Mental Math for Common Prefixes
- /16 – 2 octets free: X.Y.0.0* to X.Y.255.255* → 65 534 usable.
- /20 – 12 host bits → 2³ × 2⁹ = 4 096 addresses, 4 094 usable. Often seen when carving a /16 into 16 equal pieces.
- /25 – 7 host bits → 2⁷ = 128 addresses. Half of a /24; useful for a “guest” VLAN that needs a modest amount of addresses but still isolation.
- /30 – 2 host bits → 4 addresses, only 2 usable. Perfect for serial or Ethernet point‑to‑point links where you need just the two router interfaces.
Variable Length Subnet Mask (VLSM)
In the real world you rarely allocate the same size subnet to every segment. Variable Length Subnet Masking lets you assign the smallest block that fits the number of required hosts, preserving address space.
Example:
You have a /24 (192.168.1.0/24) and need:
- 100 hosts for the main LAN
- 30 hosts for a department LAN
- 14 hosts for a server cluster
2 hosts for a point-to-point link between two branch routers
Want to learn more? We recommend how many days until september 7 and how many days till august 12 for further reading.
Want to learn more? We recommend how many days until september 7 and how many days till august 12 for further reading.
Step 1: Sort the requirements from largest to smallest
| Required hosts | Closest prefix that fits | Subnet size | Usable hosts |
|---|---|---|---|
| 100 | /25 (128 addresses) | 128 | 126 |
| 30 | /27 (32 addresses) | 32 | 30 |
| 14 | /28 (16 addresses) | 16 | 14 |
| 2 | /30 (4 addresses) | 4 | 2 |
Step 2: Subdivide the /24 sequentially
Starting at 192.168.1.0:
-
Main LAN (100 hosts) – 192.168.1.0/25
- Network: 192.168.1.0
- Broadcast: 192.168.1.127
- Usable: 192.168.1.1 – 192.168.1.126
-
Department LAN (30 hosts) – 192.168.1.128/27
- Network: 192.168.1.128
- Broadcast: 192.168.1.159
- Usable: 192.168.1.129 – 192.168.1.158
-
Server cluster (14 hosts) – 192.168.1.160/28
- Network: 192.168.1.160
- Broadcast: 192.168.1.175
- Usable: 192.168.1.161 – 192.168.1.174
-
Point-to-point link (2 hosts) – 192.168.1.176/30
- Network: 192.168.1.176
- Broadcast: 192.168.1.179
- Usable: 192.168.1.177 and 192.168.1.178
The remaining space, 192.180 – 192.1.That said, 1. 168.255, is held in reserve for future growth. Still, 168. By allocating only what each segment needs, the design wastes 20 addresses instead of more than 200 that four equal-sized /24s would have consumed.
Step 3: Verify no overlaps
- Each subnet is laid end-to-end; no IP range crosses into another.
- Network and broadcast addresses stay within their own block.
- The router interfaces on the point-to-point link use the two usable addresses, leaving the other two for future expansion if the link is ever upgraded to a small LAN.
Why Subnetting Matters
- Efficiency – Public IPv4 addresses are exhausted; even private space is finite in large enterprises. Carving smaller subnets means fewer wasted addresses.
- Security and isolation – Broadcast domains shrink. ARP storms, DHCP contention, and unnecessary traffic stay contained to the segment that needs it.
- Performance – Smaller broadcast domains reduce baseline noise, making switches and wireless APs more efficient.
- Policy control – A subnet is the natural unit for ACLs, routing summarization, and quality-of-service rules.
- Scalability – VLSM and hierarchical design let you add new sites without renumbering the entire network.
Common Pitfalls to Avoid
- Off-by-one errors – Forgetting that the network and broadcast addresses are unusable is the single most common mistake when counting hosts.
- Overlapping subnets – Especially when using VLSM, always sort by size and assign sequentially. A calculator or subnet-planning tool is a good safeguard.
- Mismatched masks on router interfaces – If one side of a point-to-point uses /30 and the other uses /29, routing will silently fail. Consistency is essential.
- Assuming classful boundaries – CIDR replaced the old Class A/B/C system decades ago. 192.168.1.0/23 is perfectly valid even though it crosses a “class C” boundary.
- Ignoring the gateway – The first or last usable address in a subnet is typically the default gateway, leaving the rest for hosts.
Quick Reference Card
| Need hosts | Smallest subnet | Block size | Usable |
|---|---|---|---|
| 2 | /30 | 4 | 2 |
| 6 | /29 | 8 | 6 |
| 14 | /28 | 16 | 14 |
| 30 | /27 | 32 | 30 |
| 62 | /26 | 64 | 62 |
| 126 | /25 | 128 | 126 |
| 254 | /24 | 256 | 254 |
Memorize the powers of two: 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536. Each jump doubles the address space; subtracting two gives the usable count.
Looking Ahead: IPv6
IPv6 abandons the concept of subnetting for address conservation because the address pool is 128 bits wide. A typical site allocation is a /64, which provides 2⁶⁴ addresses—more than enough that variable-length subnetting inside a site is unnecessary. The skills you build with IPv4 VLSM, however, still matter:
many enterprises still operate dual-stack networks, and the same logical thinking—allocating blocks, avoiding waste, summarizing routes—transfers directly. Here's the thing — iPv6 introduces its own concepts, such as interface identifiers derived from MAC addresses (EUI-64), link-local addresses in the fe80::/10 range, and unique local addresses (fc00::/7) for internal routing. Understanding IPv4 subnetting builds the intuition needed to plan IPv6 prefix delegation, route aggregation on a global scale, and the address-lifecycle management that ISPs and large organizations require.
Practical Workflow for Real Networks
When you sit down to design or troubleshoot a subnet plan, a repeatable workflow keeps things orderly:
- Inventory requirements – List every LAN, point-to-point link, management interface, and future growth estimate. Capture the number of hosts, the location (site, rack, VLAN), and any special policies.
- Sort by size, descending – Always allocate the largest subnets first. This prevents fragmentation and ensures that smaller requirements can be carved from the remaining space without overlap.
- Choose a starting point – Many designers start at a clean boundary like 10.0.0.0 or 192.168.0.0. Others pick a “zero” point in the middle of their RFC 1918 range to leave room for growth in both directions.
- Allocate sequentially – Assign blocks one after another, recording network address, broadcast address, mask, gateway, and VLAN ID. A spreadsheet or dedicated IPAM (IP Address Management) tool is invaluable here.
- Document everything – The plan is only as good as the documentation. Include DHCP scopes, reserved addresses (printers, servers, APs), and the rationale for each allocation.
- Validate before deploying – Use a subnet calculator to double-check math. Many engineers keep a cheat sheet of the powers of two and the usable-host formula within reach for exactly this reason.
- Automate where possible – Modern networks use DHCP, DNS, and provisioning tools that pull from the same source of truth. Manual tracking quickly drifts out of date.
A Worked Example: Branch Office with VLSM
Imagine a branch office that needs:
- 60 workstations in the main LAN
- 25 IP phones in a voice VLAN
- 12 security cameras
- 2 point-to-point router links to the data center
- 1 management network for switches and APs
Starting with the largest requirement (60 hosts), a /26 gives 62 usable addresses—room for growth. Suppose the corporate allocation for this site is 172.16.50.0/24. The first /26 is 172.16.On top of that, 50. Also, 0/26 (usable . 1–.And 62, broadcast . 63). Think about it: the voice VLAN needs 25 hosts, which fits comfortably in a /27 (30 usable). The next /27 starts at 172.16.50.64/27 (.So naturally, 65–. 94, broadcast .95). Twelve cameras need a /28 (14 usable): 172.That's why 16. 50.So 96/28 (. 97–.110, broadcast .111). In practice, the management network might need 6 hosts, so a /29 (6 usable): 172. 16.50.Still, 112/29 (. 113–.118, broadcast .In real terms, 119). Finally, two point-to-point links each take a /30 (2 usable): 172.16.And 50. 120/30 and 172.But 16. In real terms, 50. Which means 124/30. This plan leaves 172.16.Day to day, 50. 128–172.16.50.Worth adding: 255 free for future expansion, and every block is documented with clear boundaries. If a new requirement appears, the planner can see at a glance which blocks are available and where they fit.
The Subnetting Mindset
Subnetting is ultimately a discipline of thinking in boundaries. Also, every decision asks: where does this block start, where does it end, and what is reserved? Now, * The network address and broadcast address are always off-limits to hosts; the gateway is conventionally the first or last usable address; and the mask tells you precisely how the address space is carved. Once you internalize that the mask length determines the block size and the usable count, you can read any IP address on a network and immediately understand its place in the topology.
The most resilient networks are not those with the cleverest tricks, but those with the cleanest plans. On the flip side, it scales because it was never built to be clever—it was built to be clear. Good subnetting design survives personnel changes, acquisitions, and the inevitable “just one more VLAN” request. Whether you are wiring a small office, joining a global enterprise, or studying for a certification, the time you invest in mastering subnetting pays back every time a new device needs an address, a new site comes online, or a packet needs to find its way home.
Latest Posts
Just Went Live
-
How Old Are You If Born In 2006
Aug 28, 2026
-
19 Out Of 24 As A Percentage
Aug 28, 2026
-
What Time Would It Be 17 Hours From Now
Aug 28, 2026
-
20 Out Of 28 As A Percentage
Aug 28, 2026
-
What Date Was 22 Days Ago
Aug 28, 2026
Related Posts
More to Discover
-
What Is The Value Of X 40 55
Aug 10, 2026
-
What Is The Percentage Of 35 Out Of 40
Aug 17, 2026
-
What Is The Percentage Of 8 15
Aug 18, 2026
-
What Is The Gcf Of 18 24
Aug 19, 2026
-
What Is The Ratio Of 1 1
Aug 19, 2026