Skip to content
Tape and Square

N-01 · Subnet · /28

/28 subnet

A /28 network keeps 28 of the 32 address bits for the network and leaves 4 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.240Wildcard 0.0.0.15
Usable hosts
1416 addresses in total

2^4 = 16 addresses. The first is the network address and the last the broadcast, so 14 can go to devices.

The /28 mask in binary and hex

28 one bits, then 4 zero bits. The wildcard is the mask inverted.

MaskDottedHex
Subnet mask255.255.255.240FF.FF.FF.F0
Wildcard0.0.0.1500.00.00.0F

The mask ends inside the fourth octet, at 240 (11110000). That leaves 4 host bits in the octet, so /28 networks start every 16 in it: 0, 16, 32, 48 and so on. Cisco access lists take the wildcard form, 0.0.0.15, where a 1 bit means “any value” (Cisco document 23602).

RFC 1878's table lists /28 as FF.FF.FF.F0 hex, 16 addresses, equal to 1/16 C in the old class terms. Its Table 1-2 counts a /28 as 16 subnets of a class C network with 14 hosts each.

How many /28 subnets fit

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

Block/28 subnets in it
10.0.0.0/81,048,576
172.16.0.0/1265,536
192.168.0.0/164,096
192.168.181.0/2416

10.0.0.0/8 holds 1,048,576, 172.16.0.0/12 holds 65,536 and 192.168.0.0/16 holds 4,096 /28 subnets. A /24 splits into 16 of them.

Splitting a /28

Each extra prefix bit halves the block.

IntoSubnetsUsable each
/2926
/3042
/3182

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

/28 subnets of 192.168.181.0/24

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

SubnetFirst usableLast usable
192.168.181.0/28192.168.181.1192.168.181.14
192.168.181.16/28192.168.181.17192.168.181.30
192.168.181.32/28192.168.181.33192.168.181.46
192.168.181.48/28192.168.181.49192.168.181.62
192.168.181.64/28192.168.181.65192.168.181.78
192.168.181.80/28192.168.181.81192.168.181.94
192.168.181.96/28192.168.181.97192.168.181.110
192.168.181.112/28192.168.181.113192.168.181.126
192.168.181.128/28192.168.181.129192.168.181.142
192.168.181.144/28192.168.181.145192.168.181.158
192.168.181.160/28192.168.181.161192.168.181.174
192.168.181.176/28192.168.181.177192.168.181.190
192.168.181.192/28192.168.181.193192.168.181.206
192.168.181.208/28192.168.181.209192.168.181.222
192.168.181.224/28192.168.181.225192.168.181.238
192.168.181.240/28192.168.181.241192.168.181.254

Check an address

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

/28

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.144/28

14 usable hosts

Network
192.168.181.144
First usable
192.168.181.145
Last usable
192.168.181.158
Broadcast
192.168.181.159
Subnet mask
255.255.255.240
Wildcard mask
0.0.0.15
Total addresses
16
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.240
11111111.11111111.11111111.11110000
Network · 192.168.181.144
11000000.10101000.10110101.10010000

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

192.168.181.0/24 split into /28

  1. 192.168.181.144/28.145–.158 ◂

/28 next to /27 and /29

One bit shorter, a /27 (255.255.255.224) has 32 addresses and 30 usable, 16 more than a /28. One bit longer, /29 (255.255.255.248) has 8 addresses and 6 usable. /27 subnet · /29 subnet

Ask the calculator for a host count and it answers /28 for 7 to 14 hosts: typing "192.168.181.144 14 hosts" gives this size, one more host gives a /27.

Worked example

Take 192.168.181.150/28. The mask ends in the fourth octet. There the address is 150 = 10010110 and the mask 240 = 11110000; AND keeps the first 4 bits: 10010000 = 144. So the network is 192.168.181.144. OR the wildcard 0.0.0.15 onto it to set every host bit: 192.168.181.159, the broadcast.

Devices use 192.168.181.145 through 192.168.181.158: 14 addresses. 192.168.181.150 is number 6 of them. In 192.168.181.0/24 this is subnet 10 of 16.

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