/23 subnet: 255.255.254.0, 512 addresses

512 addresses (510 usable hosts)

A /23 has the netmask 255.255.254.0 and holds 512 addresses, 510 of them usable hosts. It’s two /24s joined: 192.168.0.0/23 runs from 192.168.0.0 to 192.168.1.255, with one network address at the start and one broadcast address at the end, and nothing reserved in between.

The numbers

Network        192.168.0.0/23
Broadcast      192.168.1.255
Netmask        255.255.254.0
Wildcard       0.0.1.255
First host     192.168.0.1
Last host      192.168.1.254

How it fits

A /22 holds two /23s and a /16 holds 128. A /23 splits into 2 /24s or 4 /25s.

Where you’ll see it

A common reason is a /24 LAN that ran out of addresses. Changing the mask from 255.255.255.0 to 255.255.254.0 on the router, the DHCP scope and any statically configured hosts doubles the network without renumbering anything already on it. The new half is fixed, though: 192.168.1.0/24 can only grow into 192.168.0.0/23, so 192.168.0.0/24 has to be free. In the cloud, a /23 subnet leaves 507 usable addresses on AWS or Azure and 508 on Google Cloud.

Gotchas

  • Only an even third octet starts a /23. 192.168.0.0/24 and 192.168.1.0/24 make 192.168.0.0/23. 192.168.1.0/24 and 192.168.2.0/24 don’t make any /23: 192.168.1.0/23 has host bits set and normalizes to 192.168.0.0/23, while 192.168.2.0/23 is 192.168.2.0 to 192.168.3.255.
  • The middle addresses are hosts. 192.168.0.255 and 192.168.1.0 look like a broadcast and a network address, but in a /23 they’re ordinary hosts; the tool below confirms 192.168.1.0 is inside. A DHCP server can hand them out.
  • Every host needs the new mask. A host left on /24 treats the other half as a different network and sends that traffic to the gateway instead of straight across the LAN. Change the static hosts along with the router and the DHCP scope.

In your stack

# Terraform: the second /23 of 192.168.0.0/16, and the upper /24 of a /23
cidrsubnet("192.168.0.0/16", 7, 1)        # "192.168.2.0/23"
cidrsubnet("10.0.0.0/23", 1, 1)           # "10.0.1.0/24"
import ipaddress
ipaddress.ip_network("192.168.1.0/23")                 # ValueError: 192.168.1.0/23 has host bits set
ipaddress.ip_network("192.168.1.0/23", strict=False)   # IPv4Network('192.168.0.0/23')
# dnsmasq: one pool across both halves
dhcp-range=192.168.0.50,192.168.1.250,255.255.254.0,12h

Try it in the CIDR & Subnet Calculator

192.168.0.0/23 Private (RFC 1918)

Network192.168.0.0/23
Broadcast192.168.1.255
Netmask255.255.254.0
Wildcard0.0.1.255
Mask, binary11111111.11111111.11111110.00000000
First host192.168.0.1
Last host192.168.1.254
Addresses512
Usable hosts510
KindPrivate (RFC 1918)

Enter a longer prefix to list the subnets, like /24.

Yes 192.168.1.0 is inside 192.168.0.0/23

Runs in your browser. Nothing you enter is sent anywhere.