Skip to content
ENExplore Calculators

OCI VCN CIDR Calculator

Carve an OCI VCN into subnets and count usable hosts after the three addresses Oracle reserves in every subnet.

About OCI VCN CIDR Calculator

The VCN address is masked to its prefix to find the block, then divided by the subnet size to count how many subnets fit. Oracle reserves three addresses in every subnet — the network address, the subnet's default gateway and the broadcast address — so a /24 yields 253 assignable addresses rather than the 254 an on-premises design would assume. Subnet reservations shift the usable count for every subnet in the VCN at once, and a VCN CIDR cannot be shrunk after creation, so sizing on the real assignable figure avoids a re-address later. The smaller the subnet, the more the three reserved addresses hurt: a /29 gives you five hosts, not eight.

Formula

OCI VCN CIDR

usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix).

3
Addresses Oracle reserves per subnet: the network address, the subnet gateway and the broadcast address
subnet prefix
Prefix length of each subnet you carve out of the VCN
VCN prefix
Prefix length of the VCN itself, between /16 and /30

Worked example

With the default values below, OCI VCN CIDR Calculator returns Usable Hosts per Subnet of 253. Change any input above and every figure here is recalculated in your browser.

Inputs used

VCN network address
10.0.0.0
VCN prefix lengthaccepts 16–30 bits
16 bits
Subnet prefix lengthaccepts 16–30 bits
24 bits
Subnets you plan to createaccepts 1–4,096 subnets
8 subnets

Results

Usable Hosts per Subnet
253
Subnets Available in the VCN
256
VCN Address Range
10.0.0.0 – 10.0.255.255
First Subnet CIDR
10.0.0.0/24
Usable Hosts Across Planned Subnets
2,024
Addresses Reserved by Oracle
24
VCN Space Allocated
3.1%
Reservation Overhead
1.2%

Step by step

  1. 1Values used
  2. 2OCI VCN CIDR
  3. 3Usable Hosts per Subnet= 253
  4. 4Subnets Available in the VCN= 256
  5. 5VCN Address Range= 10.0.0.0 – 10.0.255.255
  6. 6First Subnet CIDR= 10.0.0.0/24
  7. 7Usable Hosts Across Planned Subnets= 2,024
  8. 8Addresses Reserved by Oracle= 24

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is OCI VCN CIDR calculated?

usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix). The VCN address is masked to its prefix to find the block, then divided by the subnet size to count how many subnets fit. Oracle reserves three addresses in every subnet — the network address, the subnet's default gateway and the broadcast address — so a /24 yields 253 assignable addresses rather than the 254 an on-premises design would assume.

Why does OCI VCN CIDR matter?

Subnet reservations shift the usable count for every subnet in the VCN at once, and a VCN CIDR cannot be shrunk after creation, so sizing on the real assignable figure avoids a re-address later. The smaller the subnet, the more the three reserved addresses hurt: a /29 gives you five hosts, not eight.

What values do I need to enter?

This calculator takes 4 inputs: VCN network address, VCN prefix length, Subnet prefix length, Subnets you plan to create. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why does a /24 subnet in OCI give 253 hosts instead of 254?

Oracle takes three addresses from every subnet rather than two: the network address, the address used as the subnet's default gateway, and the broadcast address. A /24 has 256 addresses, so 253 remain assignable to instances and load-balancer VIPs.

OCI VCN CIDR Calculator – Calculate Usable Hosts per Subnet