Skip to content
hostcomplex

What Is a Subnet and CIDR?

Maarten Soetens 2 min read

What a Subnet Is and How CIDR Notation Describes It

CIDR notation is a way of writing a range of IP addresses as a network address followed by a prefix length, such as /24. A subnet is a range of IP addresses that share the same network part, grouped together so that traffic can be routed and managed as a unit.

An IP address has a network portion that identifies the network and a host portion that identifies a device on it. Subnets divide an address space into smaller networks, each with its own range. Devices in the same subnet can reach each other directly, while traffic to another subnet passes through a router. This separation keeps networks organized and lets administrators group servers by purpose, such as a public web tier and an internal database tier.

Reading Prefix Lengths Such as /24 and /64

CIDR (Classless Inter-Domain Routing) notation puts a slash and a prefix length after an address. The prefix length is the number of bits that belong to the network portion. For example, 203.0.113.0/24 means the first 24 bits identify the network, which leaves 8 bits for hosts. An IPv4 range of /24 contains 256 addresses in total.

The same notation works for any size. A smaller prefix means a larger range: a /16 covers far more addresses than a /24, and a /32 identifies exactly one address. IPv6 uses the same idea, and a /64 prefix is the usual size for a single subnet in IPv6 networks. The address formats themselves are compared in IPv4 vs IPv6.

Where Subnets Appear in Hosting

Hosting providers assign customers address blocks such as a /29 or a /24 and describe them in CIDR notation. A firewall rule that allows traffic from a partner's network might name a range like 198.51.100.0/24 rather than listing every address. Cloud networks also divide their virtual networks into subnets, which determine where servers can be placed and which other networks they can reach.

Knowing the notation helps when reading an allowlist, a provider's network summary or a cloud configuration. It shows how many addresses are included and whether a given address falls inside the range. Private ranges used inside these networks are listed in public vs private IP addresses.

Frequently asked questions

How many addresses are in a /24 subnet?

A /24 subnet in IPv4 contains 256 addresses. Two are normally reserved: the network address at the start of the range and the broadcast address at the end, which leaves 254 addresses for hosts. Cloud providers may reserve additional addresses for their own use inside a subnet.

What does /64 mean in IPv6?

A /64 means the first 64 bits identify the network and the remaining 64 bits identify interfaces within it. It is the standard size for a single IPv6 subnet, and it leaves an enormous number of host addresses available. Larger blocks, such as /48, are usually assigned to a site or organization.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.