/23 subnet mask (255.255.254.0)
A /23 is the subnet mask 255.255.254.0: 23 network bits and 9 host bits, giving 512 addresses and 510 usable hosts. Its wildcard mask is 0.0.1.255 and its block size is 2.
- Subnet mask
- 255.255.254.0
- Wildcard
- 0.0.1.255
- Addresses
- 512
- Usable hosts
- 510
- Block size
- 2
The /23 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.11111110.00000000
23 network bits, 9 host bits.
Every /23 in 172.16.0.0/16
A /16 holds 128 /23 subnets. The first eight and the last are listed; the rest follow the same step.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 172.16.0.0/23 | 172.16.0.1 | 172.16.1.254 | 172.16.1.255 |
| 172.16.2.0/23 | 172.16.2.1 | 172.16.3.254 | 172.16.3.255 |
| 172.16.4.0/23 | 172.16.4.1 | 172.16.5.254 | 172.16.5.255 |
| 172.16.6.0/23 | 172.16.6.1 | 172.16.7.254 | 172.16.7.255 |
| 172.16.8.0/23 | 172.16.8.1 | 172.16.9.254 | 172.16.9.255 |
| 172.16.10.0/23 | 172.16.10.1 | 172.16.11.254 | 172.16.11.255 |
| 172.16.12.0/23 | 172.16.12.1 | 172.16.13.254 | 172.16.13.255 |
| 172.16.14.0/23 | 172.16.14.1 | 172.16.15.254 | 172.16.15.255 |
| 172.16.254.0/23 | 172.16.254.1 | 172.16.255.254 | 172.16.255.255 |
Where a /23 is used
A /23 is two /24 networks side by side: 510 usable hosts, the first step up when a VLAN outgrows its /24.
Its third octet must be even for the network address: 192.168.4.0/23 is valid and covers 192.168.4.0 to 192.168.5.255, while 192.168.5.0 is a host address inside it.
| Where | Usable addresses |
|---|---|
| Ordinary network | 510 |
| AWS VPC subnet (5 reserved) | 507 |
| Azure subnet (5 reserved) | 507 |
Worked example: 172.16.45.9/23
The block-size method, the way you would do it in an exam without a calculator.
- /23 means a mask of 255.255.254.0.
- The interesting octet is the third one, where the mask is 254. Block size = 256 − 254 = 2.
- Subnets in that octet start at multiples of 2. 45 falls in the block from 44 to 45.
- Network address = 172.16.44.0; broadcast = the next block minus one = 172.16.45.255.
- Usable hosts run from the network plus one to the broadcast minus one: 172.16.44.1 to 172.16.45.254, which is 2^9 − 2 = 510 addresses.
Try another address in the subnet calculator, or practise without one on the subnetting practice questions.