Network & delivery

7 min readUpdated

/24 subnet mask (255.255.255.0): hosts, splits and why BGP needs a /24

Quick answer

A /24 subnet has the mask 255.255.255.0: 24 network bits and 8 host bits, so 256 addresses, of which 254 are usable hosts once the network and broadcast addresses are set aside. It is the default size of most home and office networks. On the public internet it matters for another reason: a /24 is the smallest IPv4 block that propagates across the global BGP table, so routing or protecting your own addresses needs at least one.

01What is a /24 subnet?

The /24 says that the first 24 bits of an address identify the network. As a mask that is 255.255.255.0, and as a wildcard mask 0.0.0.255. Because the boundary falls exactly between the third and fourth octets, a /24 is the easiest network to read: in 203.0.113.0/24 every address starting 203.0.113 is on the network, and the last number picks the host. For masks in general, see what a subnet mask is.

PropertyValue for a /24
Subnet mask255.255.255.0
Mask in binary11111111.11111111.11111111.00000000
Wildcard mask0.0.0.255
Total addresses2^8 = 256
Usable hosts254, from .1 to .254
Network and broadcast.0 and .255
Reverse DNSExactly one zone, e.g. 113.0.203.in-addr.arpa for 203.0.113.0/24
Contained inA /23 (two /24s), a /22 (four), a /16 (256)
Old class nameThe size of a class C network

02How many hosts are in a /24?

254. Subtracting 24 from 32 leaves 8 host bits, and 2^8 is 256 addresses. The all-zeros address, 203.0.113.0, names the network, and the all-ones address, 203.0.113.255, is the broadcast address that reaches every host on the segment, so neither is given to a device.

In practice one more goes to the router, which leaves 253 addresses for devices. Many networks also keep a block back for static assignments such as printers, switches or a second gateway and give the DHCP server the rest; a pool from .100 to .199, for example, holds 100 leases. When 253 is not enough, the next size up is a /23 (255.255.254.0) with 510 usable hosts.

03Why /24 is the smallest prefix routed on the internet

A /24 is the longest IPv4 prefix that networks generally accept from each other in BGP. RFC 7454, the IETF's best-practice document for BGP operations, records that IPv4 prefixes longer than /24 are generally neither announced nor accepted on the internet, citing RIPE community practice. Geoff Huston's review of BGP in 2025 states the same convention: a /24 is the smallest block that propagates across the whole default-free zone.

The reason is the size of the global table. Every prefix costs memory and processing in each router that carries a full table, and Huston counted between 1,040,000 and 1,050,000 IPv4 prefixes at the end of 2025, with /22, /23 and /24 prefixes making up 84% of them. Operators filter anything more specific than /24 to keep that growth bounded.

The effect has been measured directly. In October 2014 the RIPE NCC announced a /24, a /25 and a /28, each once with and once without a route object in the routing registry, and counted how many of its 98 full-table route collector peers saw each one. A RIPE Labs follow-up in 2019 found no reason to expect a /25 to propagate any further than it did in 2014.

Prefix announced (RIPE NCC test, October 2014)Full-table peers that saw itShare
/24 with route object90 of 9892%
/25 with route object20 of 9820%
/28 with route object15 of 9815%
/24 without route object90 of 9892%
/25 without route object14 of 9814%
/28 without route object10 of 9810%

04What the /24 minimum means for BGP and GRE DDoS protection

Network-level DDoS protection for your own address space works by having the protection provider announce your prefix with BGP, so traffic for it flows through the provider's filters, and then delivering the clean traffic to you, usually through a GRE tunnel. Because nothing longer than a /24 propagates reliably, the block being protected must be at least a /24. A single server address, or a /29 from a hosting company, cannot be announced on its own.

Routers prefer the most specific matching route, so a /24 announced by a protection provider wins over the /22 that its holder announces directly, for the addresses inside it. That lets a network move only the /24 under attack. It also means the holder's route origin authorisations must allow the more specific prefix from the provider's AS, or networks that validate RPKI will reject it.

Without your own /24 there are two common alternatives: protection the hosting company applies to its own larger block, or protected addresses from the provider's space with traffic delivered by tunnel. Remote DDoS protection compares these delivery methods.

Holding a /24 of your own, rather than addresses inside a provider's block, lets you:

  • Announce it from your own ASN, or have a provider announce it for you
  • Move it between upstreams or protection providers without renumbering hosts
  • Have its reverse DNS delegated to you as a single zone
  • Create the RPKI route origin authorisations for it yourself, deciding which ASNs may announce it

05How to split a /24 into smaller subnets

Inside your own network the /24 floor does not apply: a /24 can be divided into any mix of smaller subnets, and each extra network bit halves the size and doubles the count. Splitting costs addresses, because every subnet gives up two to its network and broadcast addresses, as the last column shows.

Split intoMaskSubnetsAddresses eachUsable eachUsable in total
/25255.255.255.1282128126252
/26255.255.255.19246462248
/27255.255.255.22483230240
/28255.255.255.240161614224
/29255.255.255.2483286192
/30255.255.255.2526442128

06Worked example: one /24, seven subnets

Suppose 203.0.113.0/24 has to hold a server network of about 100 hosts, an office of 50, a VPN pool of 25, a DMZ of 10, a management segment of 5 and two router links. Allocate the largest first, each starting on a multiple of its own size, and the whole /24 is used without overlap: 128 + 64 + 32 + 16 + 8 + 4 + 4 = 256 addresses. Using /31s for the two router links (RFC 3021) would free another four. The subnet calculator checks any one of these networks.

NeedSubnetMaskUsable rangeBroadcast
Servers, up to 126203.0.113.0/25255.255.255.128.1 to .126203.0.113.127
Office, up to 62203.0.113.128/26255.255.255.192.129 to .190203.0.113.191
VPN pool, up to 30203.0.113.192/27255.255.255.224.193 to .222203.0.113.223
DMZ, up to 14203.0.113.224/28255.255.255.240.225 to .238203.0.113.239
Management, up to 6203.0.113.240/29255.255.255.248.241 to .246203.0.113.247
Router link 1203.0.113.248/30255.255.255.252.249 to .250203.0.113.251
Router link 2203.0.113.252/30255.255.255.252.253 to .254203.0.113.255
Listing subnets with Python 3.11's ipaddress module (run on Debian 12)
$ python3 -c "import ipaddress as i; print(*i.ip_network('203.0.113.0/24').subnets(new_prefix=26))"
203.0.113.0/26 203.0.113.64/26 203.0.113.128/26 203.0.113.192/26

$ python3 -c "import ipaddress as i; print(*i.ip_network('10.40.0.0/22').subnets(new_prefix=24))"
10.40.0.0/24 10.40.1.0/24 10.40.2.0/24 10.40.3.0/24

07The four /24s inside a /22, and reverse DNS

Many European networks hold a /22 rather than a single /24. When the RIPE NCC reached its last /8 in 2012, policy limited each member to one /22, and after its pool ran out in November 2019 it moved to a waiting list that allocates single /24s from recovered space to members that have not yet received an IPv4 allocation. A /22 (255.255.252.0) is exactly four consecutive /24s, and it must start on a third octet divisible by four.

Reverse DNS follows the same octet boundary. A /24 maps to exactly one in-addr.arpa zone, such as 113.0.203.in-addr.arpa for 203.0.113.0/24, so it can be delegated to its holder as a whole. Delegating anything smaller requires the CNAME technique of RFC 2317, which is why providers often keep reverse DNS for small blocks themselves.

  • 10.40.0.0/22 contains 10.40.0.0/24, 10.40.1.0/24, 10.40.2.0/24 and 10.40.3.0/24 (private space, used only for the arithmetic)
  • 10.40.4.0/22 is the next /22; 10.40.2.0/22 is not a valid network, because 2 is not a multiple of 4
  • Each of the four /24s can be announced, protected or moved on its own, if the RPKI and routing registry records allow it

Questions

Frequently asked questions

Yes. 255.255.255.0 is the dotted form of 24 one-bits followed by 8 zero-bits, which CIDR notation writes as /24. Linux tools usually print the prefix, Windows prints the mask, and both describe the same network of 256 addresses with 254 usable hosts and the wildcard mask 0.0.0.255.

You can send the announcement, but most networks filter IPv4 prefixes longer than /24, so it reaches only a small part of the internet. In the RIPE NCC's 2014 test only 20% of full-table peers saw a /25 and 15% saw a /28, against 92% for a /24. To be reachable everywhere you need at least a /24, or a provider that announces a covering block for you.

256. A /16 has 8 more host bits than a /24, and 2^8 is 256, so 10.1.0.0/16 contains every network from 10.1.0.0/24 to 10.1.255.0/24. In the same way a /22 contains four /24s and a /23 contains two, which is why RIR allocations are usually described in multiples of /24.

Only in the old naming. Before 1993, class C meant an address from 192.0.0.0 to 223.255.255.255 with an implied /24 mask. CIDR removed the classes, so today any range can be a /24, including 10.1.2.0/24 from what was class A space, and a 192.x.x.x block can have any prefix length that its holder chooses.

Only for protection that announces your own addresses with BGP, such as GRE-delivered network protection for a whole range, because nothing smaller than a /24 propagates reliably. Website protection through a reverse proxy works with any address, even a single one, because visitors connect to the proxy's addresses while your server's own address stays private.

There is no direct one. An IPv6 LAN is normally a /64, a site usually receives a /48 or a /56, and the longest IPv6 prefix generally accepted in global BGP is a /48, according to the operator practice RFC 7454 summarises. A /48 holds 65,536 /64 networks, so IPv6 address plans start from very different numbers.

Sources

Sources and verification

Every mask, range and subnet count on this page was computed, and both commands were run, with Python 3.11's ipaddress module on Debian 12, October 2026.

  1. 01RFC 7454: BGP Operations and Security, section 6.1.3 · RFC Editor
  2. 02BGP in 2025 (Geoff Huston, 8 January 2026) · APNIC Blog
  3. 03Propagation of Longer-than-/24 IPv4 Prefixes · RIPE Labs
  4. 04Visibility of IPv4 and IPv6 Prefix Lengths in 2019 · RIPE Labs
  5. 05IPv4 Run-out (final /22 policy and the /24 waiting list) · RIPE NCC
  6. 06RFC 2317: Classless IN-ADDR.ARPA delegation · RFC Editor
  7. 07RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links · RFC Editor
  8. 08RFC 4632: Classless Inter-domain Routing (CIDR) · RFC Editor
  9. 09RFC 5737: IPv4 Address Blocks Reserved for Documentation · RFC Editor

Last updated