CIDR notation explained: /24, /26, /30 and usable hosts
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
| Prefix | Subnet mask | Addresses | Usable hosts | Typical use |
|---|---|---|---|---|
| /22 | 255.255.252.0 | 1,024 | 1,022 | Large office or campus segment |
| /24 | 255.255.255.0 | 256 | 254 | Home or small office network |
| /26 | 255.255.255.192 | 64 | 62 | A department or VLAN |
| /30 | 255.255.255.252 | 4 | 2 | A point-to-point link between two routers |
Worked example: 192.168.10.37/26
- Network: 192.168.10.0
- First host: 192.168.10.1, last host: 192.168.10.62
- Broadcast: 192.168.10.63
- Wildcard mask (for ACLs): 0.0.0.63
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).