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.
| Mask | Dotted | Hex |
|---|---|---|
| Subnet mask | 255.255.255.128 | FF.FF.FF.80 |
| Wildcard | 0.0.0.127 | 00.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/8 | 131,072 |
| 172.16.0.0/12 | 8,192 |
| 192.168.0.0/16 | 512 |
| 192.168.181.0/24 | 2 |
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.
| Into | Subnets | Usable each |
|---|---|---|
| /26 | 2 | 62 |
| /27 | 4 | 30 |
| /28 | 8 | 14 |
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.
| Subnet | First usable | Last usable |
|---|---|---|
| 192.168.181.0/25 | 192.168.181.1 | 192.168.181.126 |
| 192.168.181.128/25 | 192.168.181.129 | 192.168.181.254 |
Check an address
Pre-filled with 192.168.181.150/25. Change the address or the prefix.
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
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
- 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
Related tools
- Subnet calculatorNetwork, broadcast, host range, masks and a binary view from any IPv4 or IPv6 address and prefix.
- CIDR calculatorTurn IPv4 or IPv6 ranges into the fewest CIDR blocks, merge a list, and check it for overlaps.
- VLAN plannerCarve a parent block into right-sized subnets with VLAN IDs, then export CSV or Markdown.