Networking & Communications
IPv4 Host Planner
Smallest IPv4 prefix that can hold the required number of hosts.
Networking & Communications
Smallest IPv4 prefix that can hold the required number of hosts.
App id: NET-03. Reference version 1.0.
How to fill it
Fill the inputs. The tool shows the outputs.
On the tool screen, Calc is the working sheet. Presets stores values you reuse. Reference is the formula, assumptions, and provenance below.
Formula
smallest h with 2^h − 2 ≥ hosts + reserved; prefix = 32 − hInputs
| Name | Unit |
|---|---|
| Required hosts | 1 |
| Reserved addresses (optional) | 1 |
Outputs
| Name | Unit |
|---|---|
| Recommended prefix (hero result) | 1 |
| Subnet mask | ipv4 |
| Total addresses | 1 |
| Usable addresses | 1 |
| Unused addresses | 1 |
Diagnose
This tool does not attach diagnose observations.
Assumptions
- Does not assign a network number — only the prefix size.
- One host maps to /32 and two hosts map to /31 rather than wasting a /30.
Provenance
- Host-count sizing. /31 and /32 are used for 2-host and 1-host requirements.