What is an IP prefix?
An IP prefix is a block of addresses written as a network address plus a mask length (e.g. 192.0.2.0/24). We cover announcing prefixes in BGP and /24 and /48 filters.
Last updated:
An IP prefix is a contiguous block of IP addresses written in CIDR notation as a network address plus a mask length, for example 192.0.2.0/24 or 2001:db8::/48. The number after the slash says how many leading bits of the address are fixed and shared across the whole block. The remaining bits identify individual hosts. A shorter prefix (e.g. /20) covers more addresses, a longer one (e.g. /24) fewer. In global routing the prefix is the basic unit that networks announce to each other over BGP.
CIDR notation and prefix length
CIDR (Classless Inter-Domain Routing), defined in RFC 4632, replaced the old class A, B and C split with a flexible mask length. The prefix 192.0.2.0/24 covers 256 IPv4 addresses (32 minus 24 leaves 8 host bits, i.e. 2 to the power of 8). In IPv6 (RFC 4291) the same notation works identically, except the address is 128 bits. A /48 is a typical allocation for a single site, and a /64 is the standard single subnet.
- /24 in IPv4 is 256 addresses and the longest prefix usually accepted in global BGP.
- /32 in IPv4 is a single address, used for example in anycast inside a network.
- /48 in IPv6 is a typical per-site allocation from an LIR.
- /64 in IPv6 is the standard single subnet (an L2 segment).
- A shorter prefix aggregates many longer ones and shrinks the routing table.
Announcing prefixes in BGP
For addresses to be reachable from the internet, an autonomous system must announce its prefix to its BGP neighbours. Each announcement carries the AS_PATH attribute, the list of AS numbers it has passed through, along with attributes such as NEXT_HOP and origin. A network should announce only prefixes it is entitled to, ideally matching a ROA object in RPKI (RFC 6480) and an entry in an IRR database. Aggregation is common: instead of announcing many small blocks, you announce a single shorter prefix and keep the global table at a reasonable size.
Minimum prefix-length filters: /24 and /48
Operators filter prefixes that are too long in order to protect the routing table from excessive fragmentation and from route leaks. In IPv4 the accepted boundary is /24. Prefixes longer than /24 (e.g. /25 and beyond) are generally rejected by transit networks and at public exchange points. In IPv6 the equivalent boundary is usually /48. These values appear in guidance such as IXP route-server filtering recommendations. Longer prefixes may be used inside a network or for RTBH, but they are not propagated globally.
IP prefixes in the AS202520 SkyPass network
As part of AS202520 SkyPass services we announce customer prefixes in BGP from our PoPs in Warsaw and Wrocław, both over IP transit and in peering at the Polish exchange points THINX, TPIX, WRIX and 1-IX. We apply filtering aligned with the /24 boundary for IPv4 and /48 for IPv6, RPKI validation and IRR matching, so your prefixes are announced correctly and resistant to leaks. You can check the live state of those announcements at any time in our Looking Glass tool.
Frequently asked questions
How does an IP prefix differ from a subnet?
In practice it is the same CIDR notation. The term subnet emphasises splitting a local network into segments, while prefix emphasises the block of addresses announced in routing, especially in BGP.
Why are prefixes longer than /24 rejected in BGP?
To limit the size of the global routing table and prevent leaks and deaggregation. Most transit networks and IXP route servers filter IPv4 prefixes longer than /24 and IPv6 prefixes longer than /48.
How many addresses does a /24 prefix cover?
A /24 prefix in IPv4 covers 256 addresses (.0 to .255), of which usually 254 are usable for hosts after subtracting the network and broadcast addresses.
Can I announce my own prefix without an ASN?
No. To announce a prefix in BGP yourself you need your own AS number and an allocated address block you are authorised to announce. Alternatively, a transit provider can announce the prefix on your behalf.
