Network security

/27 Subnet Mask: 255.255.255.224, 30 Hosts, and How to Use It

A /27 gives you 32 addresses and 30 usable hosts. Here is the mask in binary and dotted decimal, the eight /27 blocks inside a /24, worked examples, and when /27 is the right size.

Cysoro Security TeamPublished · 7 min read
NETWORK SECURITY /27 Subnet Mask 255.255.255.224 — 32 addresses, 30 usable hosts. CYSORO.COM 192.168.1.0/24 SPLIT INTO 8 .0 – .31/27 .32 – .63/27 .64 – .95/27 .96 – .127/27 .128 – .159/27 .160 – .191/27 .192 – .223/27
Quick answer

A /27 subnet mask is 255.255.255.224. It leaves 5 host bits, which gives 32 addresses in total; the first is the network address and the last is the broadcast address, so 30 addresses can be assigned to devices. A /27 is one-eighth of a /24 network, and it is the right size for a segment with 15 to 30 hosts.

Key takeaways

  • A /27 mask is 255.255.255.224, with 32 total addresses and 30 usable hosts.
  • A /24 splits into eight /27 subnets, with boundaries at .0, .32, .64, .96, .128, .160, .192 and .224.
  • Pick /27 when a segment needs 15 to 30 hosts; use /28 for up to 14 and /26 for up to 62.

If you are carving a network into pieces, /27 is one of the most useful sizes you will meet. It is big enough for a small office floor, a guest network or a till network, and small enough to keep broadcast traffic and security problems contained.

What is a /27 subnet mask?

A /27 subnet mask is 255.255.255.224. The "/27" means the first 27 bits of the 32-bit IPv4 address identify the network, and the remaining 5 bits identify hosts inside that network.

Written in binary, the mask is 11111111.11111111.11111111.11100000. The first three octets are all ones, so they are 255. In the last octet, the three leading ones give 128 + 64 + 32 = 224, and the five zeros leave room for hosts.

CIDR notation, defined in RFC 4632, replaced the old classful system where every network was /8, /16 or /24. With CIDR you can pick any prefix length, so a /27 is simply a /24 cut into eight equal pieces.

The /27 mask, bit by bit Network bits: 27 ones 11111111 . 11111111 . 11111111 . 111 Host bits: 5 zeros 00000 — 32 combinations 255 . 255 . 255 . 224 11111111 . 11111111 . 11111111 . 11100000 Wildcard mask (inverse): 0.0.0.31 — hex FF.FF.FF.E0
The /27 mask in binary and dotted decimal, with its wildcard form. Illustration by Cysoro.

How many hosts does a /27 have?

A /27 has 32 addresses in total and 30 usable hosts. The 5 host bits give 2 to the power of 5, which is 32 combinations, and two of those are reserved.

The two reserved addresses are the network address, where all host bits are zero, and the broadcast address, where all host bits are one. Every device on the segment talks to the broadcast address at once, and the network address names the subnet itself, so neither can be assigned to a single device.

The formula works for any prefix: usable hosts = 2^(32 − prefix) − 2. For /27 that is 2^5 − 2 = 30. Two exceptions exist: /31 subnets can use both addresses for point-to-point links under RFC 3021, and a /32 names a single host, so the minus-two rule does not apply there.

PrefixSubnet maskTotal addressesUsable hostsBlock size
/24255.255.255.0256254256
/25255.255.255.128128126128
/26255.255.255.192646264
/27255.255.255.224323032
/28255.255.255.240161416
/29255.255.255.248868
/30255.255.255.252424

Each step down the table halves the block. That halving is the fastest way to sanity-check your answer: if /26 gives 62 usable hosts, /27 must give 30.

How do you calculate a /27 subnet?

Find the block size first: 256 minus the last-octet mask value. For /27 that is 256 − 224 = 32, so /27 subnets start at every multiple of 32 in the last octet.

Take the address 192.168.1.50/27 as a worked example. The block size is 32, so the blocks run .0–.31, .32–.63, .64–.95 and so on. The address .50 falls in the .32–.63 block, which gives:

  • Network address: 192.168.1.32
  • First usable host: 192.168.1.33
  • Last usable host: 192.168.1.62
  • Broadcast address: 192.168.1.63

You can check the same result with the AND method: write the address and the mask in binary and AND each bit. The host bits become zero, leaving the network address 192.168.1.32. Both methods agree, so use whichever you find faster under exam pressure.

One more example, on a different private range: 172.16.8.70/27. The last octet, 70, falls in the 64–95 block. The network is 172.16.8.64, the usable range is 172.16.8.65 to 172.16.8.94, and the broadcast is 172.16.8.95.

Worked example: 192.168.1.50/27 Step 1 — block size256 − 224 = 32, so blocks start at .0, .32, .64 … Step 2 — find the block.50 sits in .32–.63, so the network is .32 Usable hosts .33 – .62 (30 hosts) Broadcast 192.168.1.63
Finding the network, usable range and broadcast for 192.168.1.50/27. Illustration by Cysoro.

What are the 8 /27 subnets in a /24?

A /24 holds eight /27 subnets, one for each 32-address block. Here they are for 192.168.1.0/24, the range most small offices start from.

#SubnetNetworkUsable hostsBroadcast
1192.168.1.0/27192.168.1.0.1 – .30192.168.1.31
2192.168.1.32/27192.168.1.32.33 – .62192.168.1.63
3192.168.1.64/27192.168.1.64.65 – .94192.168.1.95
4192.168.1.96/27192.168.1.96.97 – .126192.168.1.127
5192.168.1.128/27192.168.1.128.129 – .158192.168.1.159
6192.168.1.160/27192.168.1.160.161 – .190192.168.1.191
7192.168.1.192/27192.168.1.192.193 – .222192.168.1.223
8192.168.1.224/27192.168.1.224.225 – .254192.168.1.255

Notice that the first subnet starts at .0 and the last ends at .255. Nothing is wasted: eight blocks of 32 add up to exactly 256 addresses. If you split a /27 further, each extra prefix bit halves it again — one /27 becomes two /28s of 14 usable hosts each, or four /29s of 6 each.

/27 vs /26 vs /28: which mask should you use?

Pick the smallest mask that covers the hosts you need, plus room to grow. A segment with 26 devices needs /27, because /28 tops out at 14 usable hosts.

Hosts neededMask to useUsable hostsSpare addresses
2/3020
3 – 6/2960 – 3
7 – 14/28140 – 7
15 – 30/27300 – 15
31 – 62/26620 – 31
63 – 126/251260 – 63

Leave headroom for growth, printers, phones and the odd device you forgot. A 26-device office on a /27 has only 4 spare addresses, so if you expect to add staff soon, size up to /26 rather than re-addressing the whole segment later.

Smaller subnets also limit damage. A compromised device on a /27 can only reach 29 other hosts directly, and a broadcast storm stays inside 32 addresses. That is why guest Wi-Fi, point-of-sale terminals and IoT devices each get their own small subnet instead of sharing one flat /24. Our guide to securing your Wi-Fi covers segmenting guest traffic in practice.

How many /27 subnets fit in the private ranges?

The three private blocks in RFC 1918 are the address space most internal networks are built from, and each one holds a large number of /27 subnets.

Private blockTotal addresses/27 subnets inside
10.0.0.0/816,777,216524,288
172.16.0.0/121,048,57632,768
192.168.0.0/1665,5362,048
192.168.1.0/242568

Divide the block size by 32 to get the count: 65,536 ÷ 32 = 2,048 for the whole 192.168.0.0/16 range. In practice you will never use them all — the point is that address space is not the constraint. Planning, documentation and firewall rules are.

If you are checking which network your own connection uses, our free what-is-my-ip tool shows your public address in seconds.

What is the /27 wildcard mask?

The wildcard mask for /27 is 0.0.0.31. It is the subnet mask with every bit flipped: the 27 ones become zeros and the 5 zeros become ones.

Cisco access control lists and some firewall rules use the wildcard form, where a 1 bit means "this bit can be anything" and a 0 bit means "this bit must match". So an ACL entry of 192.168.1.32 0.0.0.31 matches every address from 192.168.1.32 to 192.168.1.63 — the whole second /27 in the table above.

Do not confuse the two forms. A subnet mask of 255.255.255.224 and a wildcard of 0.0.0.31 describe the same block, but entering one where the other is expected silently matches the wrong addresses. If a rule behaves strangely, check which form the device wants first.

What are the common /27 mistakes?

Most /27 errors come from forgetting the two reserved addresses or from rounding the block boundaries wrong. These are the ones to watch for.

  • Counting 32 usable hosts. A /27 has 32 addresses, but only 30 can go to devices. Forgetting the network and broadcast addresses is the most common sizing error.
  • Starting a block at the wrong boundary. /27 blocks start at multiples of 32: .0, .32, .64, .96 and so on. An address like 192.168.1.96/27 is a network address, not a host — .96 can never be assigned to a device.
  • Using /27 for two devices. A point-to-point link only needs a /30 or a /31. Giving it a /27 wastes 28 addresses and widens the segment for no reason.
  • Forgetting the gateway. The router address comes out of the same 30 usable hosts. A /27 with a gateway, a printer and 29 PCs is already full.
  • Mixing up the wildcard. 0.0.0.31 is the wildcard for /27, not 0.0.0.224. The wildcard is the inverse of the mask.

When you plan a real network, write the network, first host, last host and broadcast for every subnet in one table before you touch any device. It takes ten minutes and prevents the addressing mistakes that cost hours to find later. The small business cybersecurity checklist includes network segmentation as one of its core controls.

The bottom line

A /27 is 255.255.255.224: 32 addresses, 30 usable hosts, blocks every 32 in the last octet, and eight of them fit in a /24. Learn the block-size shortcut — 256 minus 224 — and you can work out any /27 network, broadcast and host range in seconds.

Use /27 for segments of 15 to 30 devices, keep one spare subnet for growth, and document every range before you deploy it. You can check your own public address with the free what-is-my-ip tool.

Frequently asked questions

What is the subnet mask for /27?

The /27 subnet mask is 255.255.255.224. In binary it is 11111111.11111111.11111111.11100000: 27 one bits followed by 5 zero bits. Its wildcard mask, used in access lists, is 0.0.0.31.

How many hosts can a /27 support?

A /27 supports 30 usable hosts. It has 32 addresses in total, but the first address names the network and the last is the broadcast address, so neither can be assigned to a device.

How many /27 subnets are in a /24?

A /24 splits into eight /27 subnets. Each /27 is a 32-address block, and 8 times 32 equals 256, the number of addresses in a /24. The blocks start at .0, .32, .64, .96, .128, .160, .192 and .224.

What is the difference between /27 and /28?

A /27 has 32 addresses and 30 usable hosts, while a /28 has 16 addresses and 14 usable hosts. If a segment needs 15 to 30 hosts, /27 is the smallest mask that fits. A /28 is too small for 15 or more hosts.

What is the broadcast address of 192.168.1.50/27?

The broadcast address is 192.168.1.63. The /27 block size is 32, so 192.168.1.50 sits in the .32 to .63 block. The network address is 192.168.1.32 and the usable host range is 192.168.1.33 to 192.168.1.62.

What is the wildcard mask for /27?

The wildcard mask for /27 is 0.0.0.31. It is the inverse of the subnet mask: every 1 bit in the subnet mask becomes 0, and every 0 becomes 1. Cisco access lists and some firewall rules use the wildcard form.

When should I use a /27 instead of a /24?

Use a /27 when a segment will hold 15 to 30 devices and you want to keep broadcast traffic and the blast radius small. A /24 gives one flat network of 254 hosts, which is harder to secure and slower to troubleshoot. Guest Wi-Fi, a small office floor and a point-of-sale segment are common /27 uses.

Does /27 work the same way in IPv6?

No. IPv6 does not use the same host-count math because the address space is so large. IPv6 subnets are normally /64, which leaves 64 bits for hosts, and the network and broadcast reservations of IPv4 do not apply in the same way.

Sources

  1. RFC 4632 — Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan
  2. RFC 1918 — Address Allocation for Private Internets
  3. DigiCert — Subnet Mask Cheat Sheet
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against RFC 4632 (CIDR), RFC 1918 (private addressing) and DigiCert's subnet mask cheat sheet.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free