Skip to content
Tape and Square

N-01 · Subnet · /27

/27 subnet

A /27 network keeps 27 of the 32 address bits for the network and leaves 5 for hosts. Its mask, host count, the blocks it fits in and example networks, all worked out below.

Short answer

Subnet mask
255.255.255.224Wildcard 0.0.0.31
Usable hosts
3032 addresses in total

2^5 = 32 addresses. The first is the network address and the last the broadcast, so 30 can go to devices.

The /27 mask in binary and hex

27 one bits, then 5 zero bits. The wildcard is the mask inverted.

MaskDottedHex
Subnet mask255.255.255.224FF.FF.FF.E0
Wildcard0.0.0.3100.00.00.1F

The mask ends inside the fourth octet, at 224 (11100000). That leaves 5 host bits in the octet, so /27 networks start every 32 in it: 0, 32, 64, 96 and so on. Cisco access lists take the wildcard form, 0.0.0.31, where a 1 bit means “any value” (Cisco document 23602).

RFC 1878's table lists /27 as FF.FF.FF.E0 hex, 32 addresses, equal to 1/8 C in the old class terms. Its Table 1-2 counts a /27 as 8 subnets of a class C network with 30 hosts each.

How many /27 subnets fit

The three private ranges (RFC 1918) and one /24.

Block/27 subnets in it
10.0.0.0/8524,288
172.16.0.0/1232,768
192.168.0.0/162,048
192.168.181.0/248

10.0.0.0/8 holds 524,288, 172.16.0.0/12 holds 32,768 and 192.168.0.0/16 holds 2,048 /27 subnets. A /24 splits into 8 of them.

Splitting a /27

Each extra prefix bit halves the block.

IntoSubnetsUsable each
/28214
/2946
/3082

Two /28 subnets hold 28 usable addresses between them, 2 fewer than one /27: each half gives up its own network and broadcast address.

/27 subnets of 192.168.181.0/24

192.168.181.0/24 holds 8 of them. The row in bold holds 192.168.181.150.

SubnetFirst usableLast usable
192.168.181.0/27192.168.181.1192.168.181.30
192.168.181.32/27192.168.181.33192.168.181.62
192.168.181.64/27192.168.181.65192.168.181.94
192.168.181.96/27192.168.181.97192.168.181.126
192.168.181.128/27192.168.181.129192.168.181.158
192.168.181.160/27192.168.181.161192.168.181.190
192.168.181.192/27192.168.181.193192.168.181.222
192.168.181.224/27192.168.181.225192.168.181.254

Check an address

Pre-filled with 192.168.181.150/27. Change the address or the prefix.

/27

Also accepts 192.168.1.130 255.255.255.192, 192.168.1.0 60 hosts or IPv6 like 2001:db8::/48.

Result

192.168.181.128/27

30 usable hosts

Network
192.168.181.128
First usable
192.168.181.129
Last usable
192.168.181.158
Broadcast
192.168.181.159
Subnet mask
255.255.255.224
Wildcard mask
0.0.0.31
Total addresses
32
PRIVATE

Inside 192.168.0.0/16, a private range (RFC 1918). Not routable on the public internet.

Binary view

Address · 192.168.181.150
11000000.10101000.10110101.10010110
Mask · 255.255.255.224
11111111.11111111.11111111.11100000
Network · 192.168.181.128
11000000.10101000.10110101.10000000

Bold bits are fixed for the network; orange bits number the hosts.

192.168.181.0/24 split into /27

  1. 192.168.181.128/27.129–.158 ◂

/27 next to /26 and /28

One bit shorter, a /26 (255.255.255.192) has 64 addresses and 62 usable, 32 more than a /27. One bit longer, /28 (255.255.255.240) has 16 addresses and 14 usable. /26 subnet · /28 subnet

Ask the calculator for a host count and it answers /27 for 15 to 30 hosts: typing "192.168.181.128 30 hosts" gives this size, one more host gives a /26.

Worked example

Take 192.168.181.150/27. The mask ends in the fourth octet. There the address is 150 = 10010110 and the mask 224 = 11100000; AND keeps the first 3 bits: 10000000 = 128. So the network is 192.168.181.128. OR the wildcard 0.0.0.31 onto it to set every host bit: 192.168.181.159, the broadcast.

Devices use 192.168.181.129 through 192.168.181.158: 30 addresses. 192.168.181.150 is number 22 of them. In 192.168.181.0/24 this is subnet 5 of 8.

References

  • RFC 4632, Classless Inter-domain Routing (CIDR), §3.1: prefix lengths and block sizes.
  • RFC 950, Internet Standard Subnetting Procedure: subnet masks.
  • RFC 1878, Variable Length Subnet Table For IPv4, Table 1-2.
  • RFC 1918, Address Allocation for Private Internets: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.

Other prefixes