Changing a VCN's IPv4 CIDR blocks
You can change or resize the IPv4 CIDR block range assigned to a Virtual Cloud Network (VCN), with some restrictions.
- The updated CIDR block range you specify must not overlap with any other CIDR block in this VCN or in a peered VCN.
- You can't change the CIDR block to a range that excludes an IP address in use in the current CIDR block range.
- While the VCN is being updated, you can't create or update the VCN's subnets, VLANs, local peering gateways (LPGs), or route tables.
Note
You can't edit an IPv6 prefix that's been added to a VCN.
You can't edit an IPv6 prefix that's been added to a VCN.
The VCN's state changes to UPDATING. The time to completion can vary depending on the size of the network. Updating a small network could take about a minute, and updating a large network could take up to an hour. You can view work requests to monitor the status of the update. Use the network vcn modify-vcn-cidr command and required parameters to update the specified CIDR block of a VCN:
oci network vcn modify-vcn-cidr --new-cidr-block cidr-block --original-cidr-block cidr-block --vcn-id ocid [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the ModifyVcnCidr operation to update the specified CIDR block of a VCN.