/25 subnet: 255.255.255.128, 128 addresses

128 addresses (126 usable hosts)

A /25 has the netmask 255.255.255.128 and holds 128 addresses, 126 of them usable hosts. It’s half of a /24: 192.168.1.0/25 covers .0 to .127 and 192.168.1.128/25 covers .128 to .255, and each half has its own network and broadcast address.

The numbers

                 192.168.1.0/25    192.168.1.128/25
Network          192.168.1.0       192.168.1.128
Broadcast        192.168.1.127     192.168.1.255
First host       192.168.1.1       192.168.1.129
Last host        192.168.1.126     192.168.1.254
Netmask          255.255.255.128   255.255.255.128
Wildcard         0.0.0.127         0.0.0.127

How it fits

A /24 holds two /25s and a /16 holds 512. A /25 splits into 2 /26s or 4 /27s.

Where you’ll see it

Splitting one /24 into two networks behind the same router: wired and Wi-Fi, servers and clients, or two VLANs of up to 126 hosts each. In a VPC, a /25 subnet gives 123 usable addresses on AWS and Azure and 124 on Google Cloud.

Gotchas

  • The gateway has to be inside. Hosts in 192.168.1.128/25 can’t use 192.168.1.1 as their gateway: as the tool below shows, it’s outside the block, so they have no on-link route to it. Give the upper half its own gateway address, conventionally its first host, 192.168.1.129.
  • .127 and .128 change roles. In a /24 they’re ordinary hosts. Split into /25s, .127 becomes the lower half’s broadcast address and .128 the upper half’s network address, so a printer or server statically set to either one stops working when the /24 is split. Check the DHCP reservations and static hosts first.
  • Both halves need routing. Once they’re separate networks, traffic between .0/25 and .128/25 goes through the router, so firewall rules between them now apply.

In your stack

# Terraform: the two halves of a /24, and the upper half's gateway
cidrsubnet("192.168.1.0/24", 1, 0)        # "192.168.1.0/25"
cidrsubnet("192.168.1.0/24", 1, 1)        # "192.168.1.128/25"
cidrhost("192.168.1.128/25", 1)           # "192.168.1.129"
import ipaddress
ipaddress.ip_address("192.168.1.1") in ipaddress.ip_network("192.168.1.128/25")   # False
# Linux router: one interface per half, and no traffic from the upper half to the lower
ip addr add 192.168.1.1/25 dev eth1
ip addr add 192.168.1.129/25 dev eth2
nft add rule inet filter forward ip saddr 192.168.1.128/25 ip daddr 192.168.1.0/25 drop

Try it in the CIDR & Subnet Calculator

192.168.1.128/25 Private (RFC 1918)

Network192.168.1.128/25
Broadcast192.168.1.255
Netmask255.255.255.128
Wildcard0.0.0.127
Mask, binary11111111.11111111.11111111.10000000
First host192.168.1.129
Last host192.168.1.254
Addresses128
Usable hosts126
KindPrivate (RFC 1918)

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

No 192.168.1.1 is outside 192.168.1.128/25

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