How to Find the Network and Broadcast Address of Any Subnet
What Are the Network and Broadcast Addresses?
Every IPv4 subnet is bounded by two special addresses. The network address is the first address in the subnet and identifies the subnet as a whole. The broadcast address is the last address, and packets sent to it are delivered to every host inside the subnet. Neither can be assigned to a normal host interface, which is why a /24 contains 256 total addresses but only 254 usable ones.
Being able to find both addresses quickly matters in daily operations: DHCP scopes must exclude them, firewall rules and route summaries reference them, and misassigning either one breaks connectivity in confusing ways. If you need a refresher on masks and prefix notation, start with what a subnet mask and CIDR prefix actually do — this guide assumes you can look at 192.168.10.77/26 and know its mask is 255.255.255.192.
The Fast Way: The Block Size Method
The block size method is the technique most engineers use mentally. It works for any prefix and needs no binary math.
- Find the interesting octet. This is the octet of the mask that is neither 255 nor 0. For 255.255.255.192 it is the fourth octet; for 255.255.240.0 it is the third.
- Calculate the block size. Subtract the mask value in that octet from 256. For 192, the block size is 256 − 192 = 64.
- List the multiples of the block size within that octet: 0, 64, 128, 192.
- Locate your address. Find the largest multiple that is less than or equal to the same octet of your IP. That multiple, with every following octet set to 0, is the network address.
- Find the broadcast. Take the next multiple, subtract 1, and fill the remaining octets with 255.
- Derive the usable range. It runs from network + 1 to broadcast − 1.
For prefixes in the last octet, the block size is simply the total number of addresses in the subnet:
| Prefix | Subnet mask | Block size | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Worked Example: 192.168.10.77/26
The mask is 255.255.255.192, so the interesting octet is the fourth and the block size is 64. The multiples are 0, 64, 128, and 192. The fourth octet of our address, 77, falls between 64 and 128, so the subnet begins at 192.168.10.64. The next multiple is 128, so the broadcast address is 192.168.10.127.
| Field | Value |
|---|---|
| IP address | 192.168.10.77 |
| Subnet mask | 255.255.255.192 (/26) |
| Network address | 192.168.10.64 |
| First usable address | 192.168.10.65 |
| Last usable address | 192.168.10.126 |
| Broadcast address | 192.168.10.127 |
| Usable hosts | 62 |
You can verify this result and explore every /26 boundary on the dedicated /26 subnet page.
When the Subnet Spans More Than One Octet
Prefixes shorter than /24 place the interesting octet in the third or second position. The method is identical, but remember one rule: every octet to the right of the interesting octet is 0 in the network address and 255 in the broadcast address.
Worked Example: 172.16.57.200/20
The mask is 255.255.240.0, so the interesting octet is the third and the block size is 256 − 240 = 16. The multiples are 0, 16, 32, 48, 64, and so on. The third octet, 57, falls between 48 and 64, so the network address is 172.16.48.0. The next multiple is 64, so the third octet of the broadcast is 63 and the fourth octet is 255: 172.16.63.255. The usable range is 172.16.48.1 through 172.16.63.254, giving 4,094 usable hosts.
Worked Example: 10.1.1.130/28
The mask is 255.255.255.240 with a block size of 16, so the multiples are 0, 16, 32, and so on up to 128 and 144. The fourth octet, 130, falls between 128 and 144, so the network is 10.1.1.128, the broadcast is 10.1.1.143, and the 14 usable addresses run from 10.1.1.129 to 10.1.1.142.
The Wildcard Shortcut
The wildcard mask is the inverse of the subnet mask, and it gives you the broadcast address with a single addition: network address + wildcard mask = broadcast address.
192.168.10.64+0.0.0.63=192.168.10.127172.16.48.0+0.0.15.255=172.16.63.255
Wildcards are not just a shortcut. ACLs on Cisco routers and many firewall platforms match address ranges with wildcard masks, so the same arithmetic you use to find a broadcast is what you type into an access-list entry.
Why It Works: The Binary Method
Underneath the shortcuts, the network address is a bitwise AND of the IP address and the mask, and the broadcast is the network address OR'd with the wildcard. Here is the fourth octet of 192.168.10.77/26 in binary:
Host octet: 77 = 01001101 Mask octet: 192 = 11000000 AND (network): 64 = 01000000 Wildcard: 63 = 00111111 OR (broadcast): 127 = 01111111
The AND operation zeroes out every host bit, producing the first address in the subnet. OR-ing the wildcard sets every host bit to 1, producing the last. The block size method is simply this same arithmetic done in decimal.
Common Mistakes to Avoid
- Assuming the address you were given is the network address. 192.168.10.77/26 looks like a perfectly ordinary host address, but its subnet starts at .64. Always derive the boundary.
- Off-by-one errors. The broadcast address is not usable. In the /26 example, .127 is the broadcast and .126 is the last address you can assign to a host.
- Confusing total and usable counts. A /26 has 64 total addresses but 62 usable ones. Sizing a DHCP scope with the total count overallocates by two.
- Forgetting the special prefixes. A /31 has no network or broadcast address at all — both of its addresses are usable on point-to-point links. A /32 is a single host address. Our host-count reference for /24 through /30 covers the everyday cases.
- Using the wrong octet. With 255.255.240.0, the block math happens in the third octet, not the fourth. The octets to the right simply go 0 and 255.
Real-World Scenarios
VLANs and Office Networks
When you plan a VLAN, you typically place the default gateway at the first usable address and define the DHCP pool between the first and last usable addresses, excluding the network and broadcast. For the 192.168.10.64/26 subnet above, a common layout is gateway 192.168.10.65 with a DHCP range ending at 192.168.10.126.
Point-to-Point Links
Router-to-router links need only two addresses. A /30 such as 10.0.0.0/30 provides exactly that: network 10.0.0.0, usable addresses 10.0.0.1 and 10.0.0.2, broadcast 10.0.0.3. A /31 such as 10.0.0.4/31 goes further and makes both of its addresses usable, with no network or broadcast reserved at all — halving the address consumption per link.
Cloud VPCs
Cloud platforms add their own reservations on top of the classic rules. In an AWS VPC, the first four addresses and the last address of every subnet are reserved, covering the network address, the VPC router, DNS resolution, a future purpose, and the broadcast. A /24 that offers 254 usable addresses in traditional terms leaves 251 for instances. Always check your provider's reservation rules before sizing subnets.
A Note on IPv6
IPv6 has no broadcast address at all; it was replaced by multicast and anycast. The first address in an IPv6 prefix acts as the subnet address, known as the subnet-router anycast, and every other address is usable. See IPv4 vs IPv6 subnetting differences for the full comparison.
Check Your Work with the Calculator
Mental math is a great skill for exams and whiteboard planning, but production changes deserve verification. Enter any address and prefix into the subnet calculator and it returns the network address, broadcast address, usable range, and host count instantly. For structured practice, work through our step-by-step subnetting guide — finding network and broadcast addresses quickly is the foundation for every other subnetting task.
Frequently Asked Questions (FAQ)
Can a host use the network or broadcast address? →
No. In any prefix from /1 through /30, the first and last addresses of a subnet are reserved and cannot be assigned to a host interface. The two exceptions are /31, where both addresses are usable on point-to-point links, and /32, which represents a single host address.
What is the difference between the broadcast address and the last usable address? →
The broadcast address is the very last address in the subnet. The last usable address is one below it. For example, in 192.168.10.64/26 the broadcast is 192.168.10.127, while the last address you can assign to a host is 192.168.10.126.
How do I find the network and broadcast address of a /31 or /32 subnet? →
You do not. A /31 contains exactly two addresses and, per RFC 3021, both are usable on point-to-point links, so there is no reserved network or broadcast address. A /32 is a single host address, so it is simultaneously the first and last address.
Does IPv6 have a broadcast address? →
No. IPv6 removed broadcast entirely and uses multicast and anycast instead. The first address in an IPv6 prefix serves as the subnet address, known as the subnet-router anycast address, and every other address in the prefix is usable.
Why does AWS reserve more addresses than just the network and broadcast? →
In an AWS VPC, the first four addresses and the last address of every subnet are reserved. These cover the network address, the VPC router, DNS resolution, a reserved future purpose, and the broadcast address, leaving fewer assignable addresses than traditional subnet math suggests.
Is the network address the same as the default gateway? →
No. The network address cannot be assigned to any device. The default gateway is a usable host address, and by convention many engineers place it at the first usable address, such as 192.168.10.65 in a 192.168.10.64/26 subnet.