CIDR notation explained: /24, /26, /30 and usable hosts

Kitwise guide ยท updated

The number after the slash says how many bits of the address belong to the network. Every result below comes from the IPv4 Subnet Calculator.

Free tools for this

What /26 means

An IPv4 address has 32 bits. /26 means the first 26 bits are the network and the last 6 bits are for hosts, so the block has 2โถ = 64 addresses. Two of them are reserved (the network address and the broadcast address), leaving 62 usable hosts.

Common prefixes

PrefixSubnet maskAddressesUsable hostsTypical use
/22255.255.252.01,0241,022Large office or campus segment
/24255.255.255.0256254Home or small office network
/26255.255.255.1926462A department or VLAN
/30255.255.255.25242A point-to-point link between two routers

Worked example: 192.168.10.37/26

So 192.168.10.37 sits in the first /26 block of that /24. The next block starts at 192.168.10.64.

Tip: The network starts where the address is cut down to the block size: 192.168.1.0/22 really belongs to network 192.168.0.0, because a /22 block covers 192.168.0.0 to 192.168.3.255.

Check any address in the IPv4 Subnet Calculator; it runs in your browser.

Questions

How many hosts in a /24?

256 addresses, 254 usable.

Why are two addresses not usable?

The first is the network address and the last is the broadcast address.

What about /31 and /32?

/32 is a single address; /31 is used only on point-to-point links where both addresses are used (RFC 3021).

Related guides

More guides All Developer tools All tools