What Is a /29, /28 or /24 IP Block? How Many IPs Does It Contain?
When you want additional IP addresses, the first terms you come across are usually "/29 block", "/28 block" or "/24 block". These numbers may look confusing at first, but they actually describe just one thing: how many IP addresses the block contains.
In this guide, we explain with examples what CIDR notation means, how many IPs /29, /28 and /24 blocks contain, how many of them can actually be used and which block suits which need. By the end, you'll be able to calculate an IP block yourself, add extra IPs to your server and know what to watch out for when leasing IPs.
A /29 IP block contains a total of 8 IPv4 addresses, a /28 block 16 and a /24 block 256. After subtracting the network and broadcast addresses, 6, 14 and 254 addresses respectively can be assigned to devices. If the gateway is also given from within the block, the number of addresses left for your servers is usually 5, 13 and 253.
- 01 What Is CIDR Notation? What Does "/29" Mean?
- 02 IP Block Table: How Many IPs Does Each Block Contain?
- 03 What Is a /29 IP Block?
- 04 What Is a /28 IP Block?
- 05 What Is a /24 IP Block?
- 06 Why Is the Usable IP Count Lower?
- 07 Which IP Block Is Right for You?
- 08 How to Calculate an IP Block
- 09 How to Add Extra IPs to a Server
- 10 What to Watch Out for When Leasing an IP Block
- 11 Frequently Asked Questions
- 12 Conclusion
What Is CIDR Notation? What Does "/29" Mean?
An IPv4 address consists of four numbers separated by dots, such as 203.0.113.10. Each of these four numbers is an 8-bit value; so an IPv4 address is 32 bits long in total.
The /29, /28 or /24 added to the end of an IP address is called CIDR notation (Classless Inter-Domain Routing) or the prefix length. This number tells you how many of the 32 bits are reserved for the network part. The remaining bits are the host part and determine the number of addresses in the block.
- /24: 24 bits network, 8 bits host β 28 = 256 addresses
- /28: 28 bits network, 4 bits host β 24 = 16 addresses
- /29: 29 bits network, 3 bits host β 23 = 8 addresses
The easiest way to remember the rule is this: the bigger the number after the slash, the smaller the block. When the number goes up by one, the number of addresses in the block halves; when it goes down by one, it doubles.
The 203.0.113.0/24 and 198.51.100.0/24 addresses in this article are blocks reserved by RFC 5737 for documentation and examples only. On your own server, use the real block details your provider assigned to you instead of these addresses.
IP Block Table: How Many IPs Does Each Block Contain?
The table below summarizes the IPv4 blocks most commonly encountered on the server and data center side. The "Assignable" column shows the number of addresses left after subtracting the network and broadcast addresses.
| CIDR | Subnet mask | Total IPs | Assignable IPs | Within a /24 |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (single address) | 256 |
| /30 | 255.255.255.252 | 4 | 2 | 64 |
| /29 | 255.255.255.248 | 8 | 6 | 32 |
| /28 | 255.255.255.240 | 16 | 14 | 16 |
| /27 | 255.255.255.224 | 32 | 30 | 8 |
| /26 | 255.255.255.192 | 64 | 62 | 4 |
| /25 | 255.255.255.128 | 128 | 126 | 2 |
| /24 | 255.255.255.0 | 256 | 254 | 1 |
| /23 | 255.255.254.0 | 512 | 510 | 2 Γ /24 |
| /22 | 255.255.252.0 | 1,024 | 1,022 | 4 Γ /24 |
The last column of the table shows how a /24 block is divided into smaller pieces. For example, a /24 block can be split into 32 /29 blocks or 16 /28 blocks.
What Is a /29 IP Block?
/29 is the most popular small block for servers that need additional IPs. It contains 8 consecutive IPv4 addresses, and its subnet mask is written as 255.255.255.248.
Network address: 203.0.113.8
Assignable range: 203.0.113.9 β 203.0.113.14 (6 addresses)
Broadcast address: 203.0.113.15
If the gateway is 203.0.113.9: 5 addresses from 203.0.113.10 to 203.0.113.14 are left for your servers.
A /29 block always starts with an address whose last octet is a multiple of 8: .0, .8, .16, .24 β¦ .248. So even when you write 203.0.113.10/29, the block the address belongs to is 203.0.113.8/29.
Who is a /29 block for?
- Small and medium-sized businesses that want to run web, email and application services on different IP addresses.
- Those who run several virtual machines on a single dedicated server and want to give each one a separate public IP.
- Office and data center setups that need to expose several devices to the internet behind a firewall or router.
What Is a /28 IP Block?
A /28 block is twice the size of a /29: it contains 16 IPv4 addresses and its subnet mask is 255.255.255.240. It's a balanced option for those running multiple servers or a virtualization platform.
Network address: 203.0.113.16
Assignable range: 203.0.113.17 β 203.0.113.30 (14 addresses)
Broadcast address: 203.0.113.31
If the gateway is 203.0.113.17: 13 addresses are left for your servers.
/28 blocks start with addresses whose last octet is a multiple of 16: .0, .16, .32, .48 β¦ .240.
Who is a /28 block for?
- Teams distributing public IPs to many virtual servers on platforms such as Proxmox, VMware or Hyper-V.
- Small hosting companies and agencies that offer VDS or dedicated IP services to their customers.
- Software teams that want to keep test, staging and production environments on separate IP addresses.
What Is a /24 IP Block?
A /24, formerly also known as a "Class C network", is a block that contains 256 IPv4 addresses. Its subnet mask is 255.255.255.0; that is, the first three octets of the address are fixed and only the last one changes.
Network address: 198.51.100.0
Assignable range: 198.51.100.1 β 198.51.100.254 (254 addresses)
Broadcast address: 198.51.100.255
What makes a /24 block special: BGP announcements
The importance of a /24 doesn't come only from the number of addresses. The vast majority of networks on the internet don't accept IPv4 blocks smaller than a /24 in the global routing table. So if you want to make announcements over BGP with your own autonomous system number (ASN), you generally need at least one /24 block. Small blocks such as /29 and /28 are routed within the provider's own network.
Who is a /24 block for?
- Organizations that make BGP announcements with their own ASN and want to manage their traffic through multiple providers.
- Companies offering large-scale hosting, VDS or cloud services.
- Companies that host their own infrastructure in a data center as colocation and need hundreds of public IP addresses.
Why Is the Usable IP Count Lower?
"I got 8 IPs but could only add 5 to my server" is a very common question. The reason is that in a classic subnet setup, some addresses are reserved for the network itself:
Network address
This is the first address of the block and represents the block itself. For example, in the 203.0.113.8/29 block, the .8 address isn't assigned to a device.
Broadcast address
This is the last address of the block and is used to send a message to all devices on the same network at once. In the same example, .15 is the broadcast address.
Gateway
If the provider's router uses an address from within the block, that address isn't left for you either. The gateway is usually the first assignable address of the block (such as .9), but it may vary by provider.
The difference with a routed block
Some providers give an additional IP block not as a separate subnet but routed to your server's main IP address. In this setup, the gateway is outside the block, so you can use all the addresses in the block, for example all 8 addresses of a /29. In this case, the addresses are usually configured on the server or virtual machines as /32.
Always confirm with your provider whether the block is given as a classic subnet or routed, the gateway address and the range you can use. A wrong gateway or mask can completely cut off your server's network connection.
Which IP Block Is Right for You?
The right block depends on how many addresses you need today and how you plan to grow over the next 12β24 months. The cards below give quick guidance:
Enough for those running a few services or a few virtual machines on a single server. It's the lowest-cost option.
Suitable for those setting up a virtualization platform, small hosting companies and teams planning to grow. Getting a single /28 instead of two separate /29s makes management easier.
The right choice for organizations that will make announcements with their own ASN, large hosting and cloud infrastructure, and colocation customers.
In the past, every SSL certificate needed a separate IP address. Today, thanks to SNI (Server Name Indication) support, SSL certificates for many sites work smoothly on a single IP address. You don't need to get an IP block just for SSL.
How to Calculate an IP Block
A single formula is enough to find how many addresses a block contains:
Total addresses = 2(32 β prefix length)
Assignable addresses = Total addresses β 2 (network and broadcast addresses)
For example, for a /28: 32 β 28 = 4 and 24 = 16 addresses. The number of assignable addresses is 16 β 2 = 14.
Calculating with ipcalc on Linux
On Ubuntu and Debian-based systems, the ipcalc tool shows all the details of a block with a single command:
sudo apt install ipcalc
ipcalc 203.0.113.10/29 The main fields you'll see in the output are:
Address: 203.0.113.10
Netmask: 255.255.255.248 = 29
Wildcard: 0.0.0.7
Network: 203.0.113.8/29
HostMin: 203.0.113.9
HostMax: 203.0.113.14
Broadcast: 203.0.113.15
Hosts/Net: 6 Calculating with Python
On any system with Python installed, you can use the standard ipaddress module without installing extra packages:
python3 -c "import ipaddress; n = ipaddress.ip_network('203.0.113.8/29'); print(n.netmask, n.num_addresses, n[1], n[-2], n.broadcast_address)" This command prints, in order, the mask, the total number of addresses, the first and last assignable addresses and the broadcast address: 255.255.255.248 8 203.0.113.9 203.0.113.14 203.0.113.15.
How to Add Extra IPs to a Server
The examples below were prepared for a 203.0.113.8/29 block given as a classic subnet. The gateway is 203.0.113.9, and the addresses to add to the server are 203.0.113.10 and 203.0.113.11. Replace them with your own block, interface name and gateway details.
Ubuntu: adding an IP temporarily
This method is for testing; the added address is lost when the server restarts.
ip -br link
sudo ip addr add 203.0.113.11/29 dev eth0
ip -4 addr show eth0 Ubuntu 22.04 / 24.04: adding it permanently with Netplan
For a permanent configuration, edit the YAML file in the /etc/netplan/ folder. Take a backup of the existing file first.
network:
version: 2
ethernets:
eth0:
addresses:
- 203.0.113.10/29
- 203.0.113.11/29
routes:
- to: default
via: 203.0.113.9
nameservers:
addresses: [1.1.1.1, 8.8.8.8] sudo netplan try The netplan try command applies the new setting and reverts to the old setting if you don't confirm within 120 seconds. If your connection hasn't dropped, confirm with the Enter key. If you haven't done the server's initial security settings yet, also take a look at our Ubuntu VDS initial setup guide.
Windows Server: adding with PowerShell
Get-NetAdapter
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 203.0.113.11 -PrefixLength 29 If a gateway is already defined on the interface, don't enter the gateway again for the additional addresses. You can also do the same from the graphical interface by following Network Adapter β IPv4 Properties β Advanced β IP Addresses β Add.
What to Watch Out for When Leasing an IP Block
IPv4 addresses are a limited resource. IANA's free IPv4 pool ran out in 2011; RIPE NCC, the regional registry responsible for Europe and the Middle East, allocated its last IPv4 addresses at the end of 2019. That's why additional IPv4 needs today are mostly met through IP leasing. Before leasing a block, check the following:
- IP reputation: Check whether the addresses in the block are on blacklists such as Spamhaus. An IP with a bad history can cause many problems, from email delivery to site access. You can find how reputation affects email in our guide explaining why business emails go to spam.
- Reverse DNS (PTR) record: Especially if you'll run a mail server, make sure a PTR record can be set for each IP.
- Block structure: Find out whether the block will be given as a classic subnet or routed, and the gateway address.
- Justification of use: Most providers ask for a short justification form about what you'll use the IP addresses for. This is part of the registries' address usage policies.
- Additional requirements for /24 and BGP: If you'll make announcements with your own ASN, ask whether the provider issues a letter of authorization (LOA) and how RPKI/ROA and IRR route object records will be managed.
- Location and latency: Which country the IP address appears in on geolocation databases can affect the service you offer your target audience.
- β I've calculated how many IP addresses I need today and over the next 12β24 months.
- β I've found out whether the block is classic or routed, and the gateway address.
- β I've checked that the IP addresses aren't on blacklists.
- β I've confirmed that reverse DNS (PTR) records can be set for the IPs I need.
- β I've sent my justification of use to the provider.
- β If I'll use a /24 and BGP, I've clarified the LOA, RPKI/ROA and IRR registration processes.
Frequently Asked Questions
How many IPs does a /29 IP block contain?
It contains a total of 8 IPv4 addresses. After subtracting the network and broadcast addresses, 6 addresses can be assigned to devices. If the gateway is given from within the block, usually 5 addresses are left for your servers.
How many IPs does a /28 IP block contain?
It contains a total of 16 addresses, 14 of which are assignable. If the gateway is also within the block, you can use 13 addresses.
How many IPs does a /24 IP block contain?
It contains a total of 256 addresses, 254 of which are assignable. If the gateway is within the block, 253 addresses are left. A /24 is also considered the smallest IPv4 block that can be announced to the internet via BGP.
What do /32 and /30 mean?
A /32 refers to a single IP address. A /30 consists of 4 addresses, and because only 2 of them are assignable, it's usually used for point-to-point links between two routers.
Are a subnet mask and CIDR the same thing?
Both express the same information in a different form. /29 and 255.255.255.248, and /24 and 255.255.255.0, mean the same thing. CIDR notation is shorter, so it's used more often in server and network configurations.
Are two separate /29 blocks the same as a /28?
The number of addresses is the same, but the structure is different. Each of two separate /29 blocks has its own network, broadcast and often gateway address; so in total you can use fewer addresses. A single /28 block is more efficient and easier to manage.
Why is IPv4 still being leased when IPv6 exists?
IPv6 use grows every year; however, many users, corporate networks and services still access only over IPv4. That's why an IPv4 address continues to be a necessity for internet-facing services today. The best approach is to use IPv4 and IPv6 together (dual-stack) on your servers.
Conclusion
The number after the slash in an IP block determines the block's size: a /29 contains 8 addresses, a /28 16 and a /24 256. In a classic subnet setup, the network, broadcast and gateway addresses are reserved, so the number of addresses you can use is slightly lower; with routed blocks, all addresses can be used.
If you need a few extra addresses, a /29 is the right starting point; for virtualization or a small hosting infrastructure, a /28; and for BGP announcements and large infrastructure, a /24. Before leasing the block, clarify the IP reputation, reverse DNS support and how the block will be routed with your provider.
You can explore Netiyo's IP Leasing service for your /29, /28 and /24 IPv4 block needs for server, hosting and data center projects, and request a quote for the block that fits you. If you want to host your server with your own hardware, also take a look at our server colocation options, or our dedicated server options if you want to rent a physical server.
Explore IP Leasing