Carve an OCI VCN into subnets and count usable hosts after the three addresses Oracle reserves in every subnet.
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.
OCI VCN CIDR
usable hosts = 2^(32 − subnet prefix) − 3, and subnets available = 2^(subnet prefix − VCN prefix).
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.
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.
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.
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.