Network security

What Is a /25 Subnet Mask? 255.255.255.128 Explained With 126 Hosts

A /25 gives you 128 addresses and 126 usable hosts — exactly half of a /24. Here is how it works, how to split a network with it, and when it fits.

Cysoro Security TeamPublished · 6 min read
NETWORK SECURITY/25 subnetmask128 addresses. 126 hosts.192.168.1.0/24.0/25 — staff.1 – .126 usable.128/25 — guests.129 – .254 usablemask 255.255.255.128
Quick answer

A /25 subnet mask is 255.255.255.128. It leaves 7 host bits, so a /25 subnet holds 128 addresses and 126 usable hosts, after the network and broadcast addresses are set aside. A /24 splits into exactly two /25 subnets.

Key takeaways

  • A /25 mask is 255.255.255.128, with 128 total addresses and 126 usable hosts.
  • A /24 splits into two /25 subnets: for example, 192.168.1.0/25 and 192.168.1.128/25.
  • Use a /25 when you need 63 to 126 hosts; for 127 or more, step up to a /24.

A /25 is the simplest way to cut a network in half. One extra bit in the mask, two subnets instead of one, and 126 usable hosts in each half.

What is a /25 subnet mask?

A /25 subnet mask is 255.255.255.128. The "25" counts the network bits: 25 ones followed by 7 zeros, which leaves 7 bits to number hosts inside the subnet.

An IPv4 address is 32 bits. The prefix length says how many of those bits name the network, and the rest name hosts. A /25 therefore has 25 network bits and 7 host bits, and 2 to the power of 7 is 128 addresses in total.

Two of those addresses are reserved in a normal subnet: the lowest is the network address and the highest is the broadcast address. That leaves 126 usable hosts, which is why every cheat sheet lists /25 as 128 addresses and 126 hosts.

How many hosts does a /25 subnet have?

A /25 subnet has 126 usable hosts. The formula is simple: total addresses equal 2 to the power of (32 minus the prefix), and usable hosts equal that total minus two.

For a /25, that is 2 to the power of 7, which is 128 addresses, minus the network and broadcast addresses, giving 126. The same formula gives a /24 its 254 usable hosts and a /26 its 62.

PrefixSubnet maskTotal addressesUsable hosts
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242

Each step up in prefix halves the block. That halving is the whole point of subnetting: you carve a big block into pieces that match the size each group actually needs. The DigiCert subnet mask cheat sheet lists the same figures for every common prefix.

When you plan a subnet, reserve addresses for the gateway, printers and any static devices before you count the hosts you can still add. A /25 with a gateway, two printers and a network-attached storage box already has four of its 126 usable addresses spoken for, so count from 122, not 126.

Each extra bit halves the block/24 — 256 addresses, 254 usable/25 — 128 addresses, 126 usable/26 — 64 / 62/27 — 32 / 30Total addresses = 2^(32 − prefix). Usable hosts = total − 2.
One more prefix bit halves the addresses and doubles the number of subnets. Illustration by Cysoro.

How does a /25 mask look in binary?

In binary, a /25 mask is 11111111.11111111.11111111.10000000. The first three octets are all ones, and the last octet is 10000000, which is 128 in decimal.

That last octet is where the split happens. The first bit of the fourth octet belongs to the network, so addresses starting with 0 in that bit form one /25 and addresses starting with 1 form the other. That is why /25 subnets always start at 0 or 128 in the last octet.

The wildcard mask is the inverse: 0.0.0.127, or 00000000.00000000.00000000.01111111. Cisco access lists use the wildcard form, where a 1 bit means "any value". In hex, the /25 mask is FF.FF.FF.80.

How do you split a /24 into two /25 subnets?

Take 192.168.1.0/24 and borrow one bit from the host part. You get two /25 subnets: 192.168.1.0/25 and 192.168.1.128/25, each with 126 usable hosts.

SubnetNetwork addressFirst usableLast usableBroadcast
192.168.1.0/25192.168.1.0192.168.1.1192.168.1.126192.168.1.127
192.168.1.128/25192.168.1.128192.168.1.129192.168.1.254192.168.1.255

Notice the boundary at 128. The first half runs from .0 to .127 and the second from .128 to .255. Any address from .1 to .126 belongs to the first subnet, and any from .129 to .254 belongs to the second.

To find which subnet an address belongs to, combine it with the mask using a logical AND: where the mask has a 1, the address bit is kept, and where it has a 0, the bit is cleared. For 192.168.1.150, that gives network 192.168.1.128, so the address sits in the second /25.

What does a /25 look like in practice?

Imagine a small office with 100 devices on 192.168.10.0/24. A /25 fits the whole office in one subnet, 192.168.10.0/25, with 26 addresses to spare for growth.

But suppose the office also runs a separate guest Wi-Fi network. Split the /24 instead: give staff 192.168.10.0/25 and guests 192.168.10.128/25. Each side gets 126 hosts, and a firewall rule between the two subnets keeps guests away from staff systems.

That separation is the security value of subnetting. Devices on different subnets must go through a router or firewall to talk, which gives you a place to enforce rules. A flat /24 with no separation offers no such checkpoint.

One /24, split into two /25 subnets192.168.1.0/24 — 256 addressesStaff — 192.168.1.0/25.1 – .126 usableBroadcast .127Guests — 192.168.1.128/25.129 – .254 usableBroadcast .255Traffic between the halves passes through the router or firewall.
Splitting a /24 into two /25 subnets creates a natural boundary for firewall rules. Illustration by Cysoro.

When should you use a /25?

Use a /25 when you need 63 to 126 hosts in one subnet. That range is the sweet spot: a /26 tops out at 62 usable hosts, so anything above that needs a /25 at minimum.

Common cases include a medium office floor, a VLAN for one department, or a guest network with plenty of headroom. A /25 also works when you want to split a /24 evenly between two groups of similar size.

Do not use a /25 when you need more than 126 hosts, or when fast growth is likely. Running out of addresses means renumbering, which is far more painful than starting with a /24. Leave room to grow.

How many /25 subnets fit in the private ranges?

The private ranges in RFC 1918 are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. These are the addresses you can use freely inside your own network, since they are not routable on the public internet.

Private block/25 subnets inside it
10.0.0.0/8131,072
172.16.0.0/128,192
192.168.0.0/16512
192.168.1.0/242

In practice you will never need that many. The point is that private space is generous, so you can afford to size subnets for growth and separation rather than squeezing every address.

What mistakes do people make with /25 subnets?

The most common mistake is forgetting the two reserved addresses. A /25 holds 128 addresses, but only 126 are usable, so a plan for 127 devices will fail on the last one.

  • Counting 128 usable hosts. The network and broadcast addresses are not assignable.
  • Using the wrong mask on one device. A host with a /24 mask on a /25 network will send traffic to the wrong place.
  • Forgetting the gateway. The default gateway itself uses one of the 126 usable addresses.
  • Splitting unevenly. A /25 split into /26 halves loses two more addresses to the extra network and broadcast pair.
  • Ignoring growth. A subnet that is 90 percent full today will need renumbering soon.

Check your own setup with our free IP lookup to see the address your network presents.

Our guide to securing your Wi-Fi covers the home network your subnet sits on.

The bottom line

A /25 subnet mask is 255.255.255.128, giving 128 addresses and 126 usable hosts. It is exactly half of a /24, which makes it the natural choice when you need to split a network in two or house 63 to 126 devices.

Remember the formula, 2 to the power of (32 minus the prefix) minus two, and you can work out any subnet size without a cheat sheet. Size for growth, keep the two reserved addresses in mind, and let the subnet boundary do security work for you.

You can also check how your network names resolve with our free DNS lookup when you are planning new subnets.

Frequently asked questions

How many hosts does a /25 subnet have?

A /25 subnet has 126 usable hosts. It holds 128 addresses in total, but the first address is the network address and the last is the broadcast address, so neither can be assigned to a device.

What is the subnet mask for /25?

The /25 subnet mask is 255.255.255.128. In binary it is 25 one bits followed by 7 zero bits: 11111111.11111111.11111111.10000000. Its wildcard mask is 0.0.0.127.

How many /25 subnets are in a /24?

Two. A /24 holds 256 addresses and splits into two /25 subnets of 128 addresses each. For 192.168.1.0/24, the two halves are 192.168.1.0/25 and 192.168.1.128/25.

What is the difference between /24 and /25?

A /24 has 256 addresses and 254 usable hosts, while a /25 has 128 addresses and 126 usable hosts. A /25 is exactly half a /24. Each extra prefix bit halves the block and doubles the number of subnets.

When should I use a /25 instead of a /24?

Use a /25 when you need 63 to 126 hosts and want to reserve the other half of the /24 for a different group or purpose. If you need more than 126 hosts, or expect fast growth, use a /24 instead.

What is the broadcast address of 192.168.1.128/25?

The broadcast address is 192.168.1.255. The network address is 192.168.1.128, the usable range is 192.168.1.129 to 192.168.1.254, and 192.168.1.255 is the broadcast address.

Can I assign the network or broadcast address to a host?

No, not in a normal subnet. The network address names the subnet itself and the broadcast address reaches every host on it, so assigning either to a device breaks communication. The /31 exception in RFC 3021 applies only to point-to-point links.

Sources

  1. DigiCert — Subnet Mask Cheat Sheet Practical Guide
  2. VeryStep — Subnets and CIDR Without the Headache
  3. Tape and Square — /25 Subnet Mask: 255.255.255.128, 126 Hosts
  4. RFC 1918 — Address Allocation for Private Internets
  5. RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the DigiCert subnet cheat sheet, RFC 1918 private ranges and the standard CIDR host-count formula.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free