Changing Which VCN Route Table a Subnet Uses

Change which virtial cloud network (VCN) route table a subnet uses.

For an overview of routing in your VCN and subnets, see VCN Route Tables.
    1. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    2. Click the name of the VCN you're interested in.
    3. Click Subnets.
    4. Click the name of the subnet you're interested in.
    5. Click Edit.
    6. In the Route Table section, select the new route table you want the subnet to use.
    7. Click Save changes.
    The changes takes effect within a few seconds.
  • Use the network subnet update command and described parameters to change which route table a subnet uses:

    oci network subnet update --subnet-id ocid --route-table-id routetable-ocid ... [OPTIONS]

    The route-table-id is the OCID of the route table the subnet will use.

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the UpdateRouteTable operation to change which VCN route table a subnet uses.