Adding IP Address Ranges to a VCN
You can add an IPv4 CIDR block or IPv6 prefix to a Virtual Cloud Network (VCN), with some limitations.
- The IPv4 CIDR block or IPv6 prefix you add must not overlap with any other address range in the VCN or in a peered VCN.
- The new IPv4 CIDR block or IPv6 prefix must not include an IP address used in an existing route rule.
- While the VCN is being updated, you can't create or update the VCN's subnets, VLANs, local peering gateways (LPGs), or route tables.
- After you add an IPv6 prefix to a VCN, you can't edit the IPv6 prefix.
The VCN's state changes to UPDATING. Completing this operation can take a few minutes. You can view work requests to monitor the status of the update. Use the network vcn add-vcn-cidr command and required parameters to add an IPv4 CIDR block to a VCN:
oci network vcn add-vcn-cidr --cidr-block cidr-block --vcn-id ocid [OPTIONS]
Use the network vcn add-ipv6-vcn-cidr command and required parameters to add an IPv6 prefix to a VCN:
oci add-ipv6-vcn-cidr --vcn-id ocid [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the AddVcnCidr operation to add an IPv4 CIDR block to a VCN.
Run the AddIpv6VcnCidr operation to add an IPv6 prefix to a VCN.