/25 subnet mask (255.255.255.128)
A /25 is the subnet mask 255.255.255.128: 25 network bits and 7 host bits, giving 128 addresses and 126 usable hosts. Its wildcard mask is 0.0.0.127 and its block size is 128.
- Subnet mask
- 255.255.255.128
- Wildcard
- 0.0.0.127
- Addresses
- 128
- Usable hosts
- 126
- Block size
- 128
The /25 mask in binary
The prefix is the number of 1 bits at the start of the mask. Ones mark the network part of an address, zeros the host part.
11111111.11111111.11111111.10000000
25 network bits, 7 host bits.
Every /25 in 192.168.1.0/24
A /24 holds 2 /25 subnets, each starting where the previous one ends.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 192.168.1.0/25 | 192.168.1.1 | 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/25 | 192.168.1.129 | 192.168.1.254 | 192.168.1.255 |
Where a /25 is used
A /25 splits a /24 in half: two subnets of 126 usable hosts, starting at .0 and .128.
It is the first prefix where the network no longer ends on an octet boundary, so it is where the block-size method starts to matter.
| Where | Usable addresses |
|---|---|
| Ordinary network | 126 |
| AWS VPC subnet (5 reserved) | 123 |
| Azure subnet (5 reserved) | 123 |
Worked example: 192.168.1.77/25
The block-size method, the way you would do it in an exam without a calculator.
- /25 means a mask of 255.255.255.128.
- The interesting octet is the fourth one, where the mask is 128. Block size = 256 − 128 = 128.
- Subnets in that octet start at multiples of 128. 77 falls in the block from 0 to 127.
- Network address = 192.168.1.0; broadcast = the next block minus one = 192.168.1.127.
- Usable hosts run from the network plus one to the broadcast minus one: 192.168.1.1 to 192.168.1.126, which is 2^7 − 2 = 126 addresses.
Try another address in the subnet calculator, or practise without one on the subnetting practice questions.