Skip to content
Tape and Square

N-01 · Subnet · /25

/25 subnet

A /25 network keeps 25 of the 32 address bits for the network and leaves 7 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.128Wildcard 0.0.0.127
Usable hosts
126128 addresses in total

2^7 = 128 addresses. The first is the network address and the last the broadcast, so 126 can go to devices.

The /25 mask in binary and hex

25 one bits, then 7 zero bits. The wildcard is the mask inverted.

MaskDottedHex
Subnet mask255.255.255.128FF.FF.FF.80
Wildcard0.0.0.12700.00.00.7F

The mask ends inside the fourth octet, at 128 (10000000). That leaves 7 host bits in the octet, so /25 networks start every 128 in it: 0, 128 and so on. Cisco access lists take the wildcard form, 0.0.0.127, where a 1 bit means “any value” (Cisco document 23602).

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

How many /25 subnets fit

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

Block/25 subnets in it
10.0.0.0/8131,072
172.16.0.0/128,192
192.168.0.0/16512
192.168.181.0/242

10.0.0.0/8 holds 131,072, 172.16.0.0/12 holds 8,192 and 192.168.0.0/16 holds 512 /25 subnets. A /24 splits into 2 of them.

Splitting a /25

Each extra prefix bit halves the block.

IntoSubnetsUsable each
/26262
/27430
/28814

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

/25 subnets of 192.168.181.0/24

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

SubnetFirst usableLast usable
192.168.181.0/25192.168.181.1192.168.181.126
192.168.181.128/25192.168.181.129192.168.181.254

Check an address

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

/25

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/25

126 usable hosts

Network
192.168.181.128
First usable
192.168.181.129
Last usable
192.168.181.254
Broadcast
192.168.181.255
Subnet mask
255.255.255.128
Wildcard mask
0.0.0.127
Total addresses
128
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.128
11111111.11111111.11111111.10000000
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 /25

  1. 192.168.181.128/25.129–.254 ◂

/25 next to /24 and /26

One bit shorter, a /24 (255.255.255.0) has 256 addresses and 254 usable, 128 more than a /25. One bit longer, /26 (255.255.255.192) has 64 addresses and 62 usable. /24 subnet · /26 subnet

Ask the calculator for a host count and it answers /25 for 63 to 126 hosts: typing "192.168.181.128 126 hosts" gives this size, one more host gives a /24.

Worked example

Take 192.168.181.150/25. The mask ends in the fourth octet. There the address is 150 = 10010110 and the mask 128 = 10000000; AND keeps the first 1 bit: 10000000 = 128. So the network is 192.168.181.128. OR the wildcard 0.0.0.127 onto it to set every host bit: 192.168.181.255, the broadcast.

Devices use 192.168.181.129 through 192.168.181.254: 126 addresses. 192.168.181.150 is number 22 of them. In 192.168.181.0/24 this is subnet 2 of 2.

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