/27 Subnet: Mask 255.255.255.224

A /27 holds 32 addresses, 30 usable. A /24 splits into eight of them, starting every 32: .0, .32, .64, .96, .128, .160, .192, .224.

/27 at a glance

Subnet mask
255.255.255.224
Wildcard mask
0.0.0.31
Usable hosts
30
Total addresses
32 (25)
Block size (fourth octet)
32
Network / host bits
27 / 5
Mask in hex
0xFFFFFFE0

Mask in binary: 11111111.11111111.11111111.11100000

Network bits Host bits

Try it: which /27 is an address in?

Network address
10.0.3.96/27
First usable host
10.0.3.97
Last usable host
10.0.3.126
Broadcast address
10.0.3.127
Next /27 starts at
10.0.3.128

How many /27 networks fit

How /27 relates to /8, /16 and /24 blocks
Parent block Relationship
/8 524,288 × /27 fit inside one /8
/16 2,048 × /27 fit inside one /16
/24 8 × /27 fit inside one /24

8 × /27 = one /24. A /27 holds 2 × /28 or 8 × /30.

Worked example: 10.0.3.100/27

A firewall rule references 10.0.3.100 in a /27 DMZ. Which /27 is it, and which addresses does the rule need to cover?

  1. The mask is 255.255.255.224. The fourth octet (224) is the "interesting" one — the first that is not 255.
  2. Block size = 256 − 224 = 32. Networks start at multiples of 32 in the fourth octet: 0, 32, 64, …
  3. The fourth octet of 10.0.3.100 is 100. 100 ÷ 32 = 3 remainder 4, so the block starts at 3 × 32 = 96.
  4. Network = 10.0.3.96. Broadcast = 96 + 32 − 1 = 127, giving 10.0.3.127.
  5. Usable hosts: 10.0.3.97 to 10.0.3.126, which is 25 − 2 = 30 addresses.

Same thing in binary (network bits | host bits):

Address  00001010.00000000.00000011.011|00100
Mask     11111111.11111111.11111111.111|00000
Network  00001010.00000000.00000011.011|00000

Where /27 is used in real networks

  • Azure VPN and ExpressRoute GatewaySubnet

    Microsoft recommends a /27 or larger for GatewaySubnet so you can add ExpressRoute and VPN gateways later without re-creating it.

  • DMZ and server VLANs

    A /27 fits a small DMZ with a firewall interface, a couple of load balancers and a few web servers, with room to grow.

Common /27 mistakes

  • Working out .100's block as .96 to .128. The block is .96 to .127 (32 addresses including .96). .128 starts the next /27.
  • Writing the wildcard as 0.0.0.32. It is 0.0.0.31 — one less than the block size.

/27 FAQ

How many hosts are in a /27?

30: 2^5 = 32 addresses minus network and broadcast.

What is the wildcard for /27?

0.0.0.31, one less than the block size of 32. In OSPF: network 10.0.3.96 0.0.0.31 area 0.

How many /27 subnets fit in a /24?

Eight. Three extra network bits (27 − 24) give 2^3 = 8 subnets of 32 addresses each.

Related tools