Updated: 12 October 2026 · Applies to: IPv4 addressing and CIDR notation (RFC 4632); calculations checked with Python 3.14 (ipaddress) and ipcalc 0.51 on Debian 13

The /24 after an IP address (say "slash 24") means that the first 24 of its 32 bits are the network part. A /24 is the same as the subnet mask 255.255.255.0: the first three numbers stay fixed and only the last one changes. So a /24 holds 256 addresses, for example 198.51.100.0 to 198.51.100.255. The first one (.0) is the network address and the last one (.255) is the broadcast address, which leaves 254 usable addresses (.1 to .254). When the gateway also takes an address inside the block, which is common for server subnets, 253 are left for your own use.

How slash notation works

An IPv4 address is 32 bits, written as four numbers from 0 to 255 (each one is 8 bits, called an octet). The number after the slash, the prefix length, says how many bits from the left belong to the network. The remaining bits number the hosts inside that network, so a block has 2 to the power of (32 minus the prefix) addresses:

  • /24: 24 network bits, 8 host bits, 2 to the power of 8 = 256 addresses.
  • Subnet mask in binary: 11111111.11111111.11111111.00000000, which is 255.255.255.0.
  • 198.51.100.37/24 is host 37 in the network 198.51.100.0/24. Every address from 198.51.100.0 to 198.51.100.255 is in the same network; 198.51.101.5 is not.

A /24 subnet at a glance

  • Subnet mask: 255.255.255.0 (wildcard mask 0.0.0.255)
  • Addresses in total: 256
  • Network address: the first one, for example 198.51.100.0
  • Broadcast address: the last one, for example 198.51.100.255
  • Usable host addresses: 254 (198.51.100.1 to 198.51.100.254)
  • Usable on a server whose gateway is inside the block: 253
  • A /24 splits into 2 /25s, 4 /26s, 8 /27s, 16 /28s or 32 /29s, and two neighbouring /24s make a /23 (512 addresses).

Check a subnet yourself

You do not need to work this out by hand. Python's ipaddress module (included with Python 3) and the ipcalc tool both do it. Lab example:

$ python3 -c 'import ipaddress; n = ipaddress.ip_network("198.51.100.0/24"); print(n.netmask, n.num_addresses, n.network_address, n.broadcast_address)'
255.255.255.0 256 198.51.100.0 198.51.100.255

$ ipcalc -n 198.51.100.37/24
Address:   198.51.100.37        11000110.00110011.01100100. 00100101
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   198.51.100.0/24      11000110.00110011.01100100. 00000000
HostMin:   198.51.100.1         11000110.00110011.01100100. 00000001
HostMax:   198.51.100.254       11000110.00110011.01100100. 11111110
Broadcast: 198.51.100.255       11000110.00110011.01100100. 11111111
Hosts/Net: 254                   Class C

In the ipcalc output, the space inside each binary address marks where the network part ends and the host part begins. -n turns off coloured output. On Debian and Ubuntu, install the tool with sudo apt install ipcalc.

More on the tool: How to Calculate IP Subnet Address with ipcalc Tool?

/24 compared with other subnet sizes

  • /32: 1 address, a single IP.
  • /30: 4 addresses, 2 usable.
  • /29: 8 addresses, 6 usable (5 when the gateway is inside the block).
  • /28: 16 addresses, 14 usable (13).
  • /27: 32 addresses, 30 usable (29).
  • /26: 64 addresses, 62 usable (61).
  • /25: 128 addresses, 126 usable (125).
  • /24: 256 addresses, 254 usable (253).
  • /23: 512 addresses, 510 usable.
  • /16: 65,536 addresses (subnet mask 255.255.0.0).

More prefixes with their subnet masks: Subnet Mask Cheat Sheet: CIDR Prefixes, Netmasks and Usable Hosts.

Is a /24 the same as a Class C network?

In size, yes. Before CIDR, IPv4 used fixed address classes, and a Class C network (first number 192 to 223) always had a 24-bit network part and 254 host addresses. RFC 4632, which defines CIDR, gives the example that the legacy Class C network 192.168.99.0 is the prefix 192.168.99.0/24. Classes are no longer used for routing: any prefix length can be assigned, and a /24 can start with any first number. People still say "a class C" when they mean a /24, as they say "class B" for a /16 and "class A" for a /8.

Private and public /24 networks

Home and office routers often hand out addresses from a private /24 such as 192.168.1.0/24. The private ranges set aside in RFC 1918 are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; they are not reachable from the internet, so many networks can use the same ones. A server's public addresses come from blocks routed on the internet. On a Linux server, ip -4 addr shows each address with its prefix, for example inet 203.0.113.10/24.

IPv4 subnets on Ucartz servers

Common reasons for a larger block are hosting customers who each need their own address, separate mail streams, VPN endpoints and many game or streaming instances. For email, our Acceptable Use Policy (section 3) allows several IPs and automation for legitimate sending, such as one IP per domain, IP pools, warm-up and rate limits, but not using extra IPs to get around blocks or filters, such as switching to a new IP after one is blocked. See How to warm up a new sending IP address step by step?

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)