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.
  • To add IP address ranges, follow these steps:

    1. On the Virtual Cloud Networks list page, select the VCN that you want to work with. If you need help finding the list page or the VCN, see Listing VCNs.
    2. On the details page, perform one of the following actions depending on the option that you see:
      • On the IP Administration tab, go to the CIDR Blocks/Prefixes section.
      • Under Resources, select CIDR Blocks/Prefixes.
    3. Select Add CIDR Block/IPv6 Prefix.
    4. Enter the value of the CIDR block or IPv6 prefix that you want to add to the VCN.
      With IPv6, you can select an Oracle-allocated IPv6 prefix, select a BYOIPv6 prefix that you already imported, or specify a ULA prefix. For BYOIPv6, you can also subdivide the prefix here, if you're only assigning part of the imported IPv6 prefix to this VCN.
    5. Select Add CIDR Blocks/Prefixes.
    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.