Introduction
Read common prefix boundaries, block sizes and endpoint conventions when planning a subnet. Only for certain boundaries. In 192.0.2.65/26, the six host bits span values from .64 through .127. Setting all six host bits to one gives the directed broadcast address 192.0.2.127.
Method and concepts
For a conventional IPv4 broadcast LAN, count every address-consuming interface, including router interfaces. Add two positions for the network and broadcast addresses, then round the result up to a power of two. If the rounded size is 2^h, the IPv4 prefix is 32 − h.
- Select an entry to isolate the relevant case.
- Read the associated evidence and compare it with your local configuration.
Subnetting and address planning diagram
- Parent · 192.0.2.0/25
- Office · .0/26
- Meeting rooms · .64/27
- Free block · .96/27
Worked examples
Read the /16 entry
- 255.255.0.0 · 65,536
- Both final octets vary. A /16 allocation may contain many smaller LANs.
Subnetting and address planning: Fit two multiaccess LANs into a /25
- The office requires 48 interface addresses and the meeting rooms require 18. Including endpoints gives totals of 50 and 20. The next powers of two are 64 and 32.
- Assign 192.0.2.0/26 to the office. Its conventional host range is .1–.62. Assign 192.0.2.64/27 to the meeting rooms, with host range .65–.94.
- The second LAN ends at .95. The parent ends at .127, leaving .96–.127, exactly 192.0.2.96/27. The spare host positions inside the first two LANs remain with those allocations.
Reference table
| IPv4 prefix | Mask · total addresses | Boundary or endpoint convention |
|---|---|---|
| /16 | 255.255.0.0 · 65,536 | Both final octets vary. A /16 allocation may contain many smaller LANs. |
| /23 | 255.255.254.0 · 512 | The network begins at an even third octet and covers two consecutive /24s. |
| /24 | 255.255.255.0 · 256 | Last octet spans 0–255. Conventional multiaccess assignment leaves 254 host positions. |
| /26 | 255.255.255.192 · 64 | Final-octet starts are 0, 64, 128 and 192. Conventional host capacity is 62. |
| /27 | 255.255.255.224 · 32 | A block starting at .64 ends at .95. Its ordinary LAN host interval is .65–.94. |
| /30 | 255.255.255.252 · 4 | Conventional broadcast subnet with two host positions. |
| /31 | 255.255.255.254 · 2 | RFC 3021 point-to-point links can assign both addresses as endpoints. |
| /32 | 255.255.255.255 · 1 | A host route selects exactly one address. |
Reading the result
The conventional LAN capacity of a /30 is two interfaces. RFC 3021 allows a /31 to carry two endpoints on a point-to-point link. A /32 identifies one address. A host-count rule must state which of these intended uses it covers.
Common mistakes
- Starting a /26 at .32 in a /24 because 64 addresses remain after it.
- Counting a gateway separately after the requirement already included all interfaces.
Frequently asked questions
Can I find my subnet's broadcast just by replacing the last octet with 255?
Only for certain boundaries. In 192.0.2.65/26, the six host bits span values from .64 through .127. Setting all six host bits to one gives the directed broadcast address 192.0.2.127.
Why does requesting one extra interface sometimes double the allocation?
A conventional /27 has 30 host positions. Growing to 31 required interfaces crosses that threshold, so the smallest eligible power-of-two block is a /26.
How do I test the sheet for overlap?
Calculate each network's inclusive first and last addresses, sort by the first address, and verify that each following first address is greater than the previous last address.
How many IPv4 addresses are in a /27?
A /27 leaves five host bits, so the block contains 2^5 = 32 addresses. Usable host counts depend on subnet purpose and special cases such as point-to-point /31 links.
Why is a network address not always the first usable host?
In a conventional multi-access IPv4 subnet, the all-zero host portion names the network and the all-one host portion is the directed broadcast. Specialized prefixes can have different host-use rules.
Can two subnets overlap without a routing problem?
Overlapping prefixes can make route selection and address ownership ambiguous. A design should allocate non-overlapping blocks within the routing domain unless it explicitly handles overlap.
Should subnet size be rounded up or down to meet host demand?
Choose the smallest valid block that accommodates the required endpoints plus any addresses reserved by the network design. Leave room for documented growth when the plan requires it.
Why do conventional IPv4 subnets reserve two addresses?
For a typical subnet with at least two host bits, the all-zero host part identifies the subnet and the all-one host part is its directed broadcast. Point-to-point /31 links are a defined exception.
Can a /31 be used for a point-to-point IPv4 link?
Yes. RFC 3021 permits both addresses of a /31 to be used as endpoints on a point-to-point link, where a subnet and broadcast address are unnecessary.
What is the first step when splitting a parent network?
Choose child prefixes that fit the required host counts, then verify that each child starts on a valid boundary and remains entirely inside the parent allocation.
Why keep space for future growth in a subnet plan?
A plan with no room can force renumbering or fragmentation of later allocations. Documented headroom can make expansion easier, provided it does not create unnecessary waste or overlap.
How does VLSM differ from fixed-length subnetting?
Variable Length Subnet Masking assigns different prefix lengths to different subnets according to their needs. This can use address space more efficiently when host requirements vary.
Why must a subnet start on a block boundary?
A prefix fixes leading bits, so the network value must have all host bits set to zero. A misaligned address is normalized to the aligned network that contains it.
How many addresses does an IPv6 /64 contain?
It leaves 64 host bits, so the mathematical address count is 2^64. That count does not imply that a LAN should manually assign every address or that each value is used.
Should every IPv4 subnet subtract exactly two usable hosts?
That is the common rule for ordinary IPv4 multi-access subnets with enough host bits. Point-to-point /31 links and very small prefixes have special handling, so check the intended use.
What should be checked after a VLSM plan is calculated?
Verify every child prefix is aligned, contained in the parent, non-overlapping, large enough for its requirement, and consistent with the site policy and reserved addresses.
Further learning and references
- RFC 4632 · Classless Inter-domain Routing
Reference source for the concepts and service described in this guide.
- RFC 3021 · IPv4 /31 on point-to-point links
- RFC 1878 · IPv4 variable-length subnet table

