N-01 · Subnet · /24
/24 subnet
A /24 network keeps 24 of the 32 address bits for the network and leaves 8 for hosts. Its mask, host count, the blocks it fits in and example networks, all worked out below.
Short answer
- Subnet mask
- 255.255.255.0Wildcard 0.0.0.255
- Usable hosts
- 254256 addresses in total
2^8 = 256 addresses. The first is the network address and the last the broadcast, so 254 can go to devices.
The /24 mask in binary and hex
24 one bits, then 8 zero bits. The wildcard is the mask inverted.
| Mask | Dotted | Hex |
|---|---|---|
| Subnet mask | 255.255.255.0 | FF.FF.FF.00 |
| Wildcard | 0.0.0.255 | 00.00.00.FF |
A /24 mask ends exactly at the end of the third octet, so networks step by 1 in that octet and the last octet is hosts. Cisco access lists take the wildcard form, 0.0.0.255, where a 1 bit means “any value” (Cisco document 23602).
RFC 1878's table lists /24 as FF.FF.FF.00 hex, 256 addresses, equal to 1 C in the old class terms. Its Table 1-1 counts a /24 as 256 subnets of a class B network with 254 hosts each. Erratum 3147 corrects that table's last row for each size: the all-ones subnet ends at N.N.255.255, and the /24 row should read 256 nets of 254 hosts.
How many /24 subnets fit
The three private ranges (RFC 1918) and one /24.
| Block | /24 subnets in it |
|---|---|
| 10.0.0.0/8 | 65,536 |
| 172.16.0.0/12 | 4,096 |
| 192.168.0.0/16 | 256 |
| 192.168.181.0/24 | 1 (same size) |
10.0.0.0/8 holds 65,536, 172.16.0.0/12 holds 4,096 and 192.168.0.0/16 holds 256 /24 subnets.
Splitting a /24
Each extra prefix bit halves the block.
| Into | Subnets | Usable each |
|---|---|---|
| /25 | 2 | 126 |
| /26 | 4 | 62 |
| /27 | 8 | 30 |
Two /25 subnets hold 252 usable addresses between them, 2 fewer than one /24: each half gives up its own network and broadcast address.
/24 subnets of 192.168.0.0/16
192.168.0.0/16 holds 256 of them. The row in bold holds 192.168.181.150.
| Subnet | First usable | Last usable | |
|---|---|---|---|
| 192.168.0.0/24 | 192.168.0.1 | 192.168.0.254 | |
| 192.168.1.0/24 | 192.168.1.1 | 192.168.1.254 | |
| 192.168.2.0/24 | 192.168.2.1 | 192.168.2.254 | |
| … 178 more subnets | |||
| 192.168.181.0/24 | 192.168.181.1 | 192.168.181.254 | |
| … 73 more subnets | |||
| 192.168.255.0/24 | 192.168.255.1 | 192.168.255.254 | |
Special-purpose /24 blocks
Blocks of exactly this size in the IANA IPv4 Special-Purpose Address Space registry.
| Block | Use |
|---|---|
| 192.0.0.0/24 | IETF Protocol Assignments |
| 192.0.2.0/24 | Documentation (TEST-NET-1) |
| 192.31.196.0/24 | AS112-v4 |
| 192.52.193.0/24 | AMT |
| 192.88.99.0/24 | Deprecated (6to4 Relay Anycast) |
| 192.175.48.0/24 | Direct Delegation AS112 Service |
| 198.51.100.0/24 | Documentation (TEST-NET-2) |
| 203.0.113.0/24 | Documentation (TEST-NET-3) |
Check an address
Pre-filled with 192.168.181.150/24. Change the address or the prefix.
Result
192.168.181.0/24
254 usable hosts
- Network
- 192.168.181.0
- First usable
- 192.168.181.1
- Last usable
- 192.168.181.254
- Broadcast
- 192.168.181.255
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Total addresses
- 256
Inside 192.168.0.0/16, a private range (RFC 1918). Not routable on the public internet.
Binary view
- Address · 192.168.181.150
- 11000000.10101000.10110101.10010110
- Mask · 255.255.255.0
- 11111111.11111111.11111111.00000000
- Network · 192.168.181.0
- 11000000.10101000.10110101.00000000
Bold bits are fixed for the network; orange bits number the hosts.
192.168.0.0/16 split into /24 · 256 blocks
- … 178 before
- 192.168.181.0/24.181.1–.181.254 ◂
- … 70 more
/24 next to /23 and /25
One bit shorter, a /23 (255.255.254.0) has 512 addresses and 510 usable, 256 more than a /24. One bit longer, /25 (255.255.255.128) has 128 addresses and 126 usable. /23 subnet · /25 subnet
Ask the calculator for a host count and it answers /24 for 127 to 254 hosts: typing "192.168.181.0 254 hosts" gives this size, one more host gives a /23.
/24 is the old class C size: RFC 4632 §3.1 lists it as the legacy “Class C” block, whose mask 255.255.255.0 was implied by the address class before CIDR. With CIDR the prefix length is written out, so a /24 can start at any multiple of 256 addresses.
Worked example
Take 192.168.181.150/24. The mask 255.255.255.0 is all ones through the third octet and all zeros after it. Keep the first 3 octets of the address and zero the rest: the network is 192.168.181.0. Set the host octets to 255 instead and you get the broadcast, 192.168.181.255.
Devices use 192.168.181.1 through 192.168.181.254: 254 addresses. 192.168.181.150 is number 150 of them. In 192.168.0.0/16 this is subnet 182 of 256.
References
- RFC 4632, Classless Inter-domain Routing (CIDR), §3.1: prefix lengths and block sizes (legacy "Class C").
- RFC 950, Internet Standard Subnetting Procedure: subnet masks.
- RFC 1878, Variable Length Subnet Table For IPv4, Table 1-1, with erratum 3147 (all-ones subnet rows).
- RFC 1918, Address Allocation for Private Internets: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
- IANA IPv4 Special-Purpose Address Space registry (updated 2025-10-09).
Other prefixes
Related tools
- Subnet calculatorNetwork, broadcast, host range, masks and a binary view from any IPv4 or IPv6 address and prefix.
- CIDR calculatorTurn IPv4 or IPv6 ranges into the fewest CIDR blocks, merge a list, and check it for overlaps.
- VLAN plannerCarve a parent block into right-sized subnets with VLAN IDs, then export CSV or Markdown.