Updating a VCN Route Table's Rules

Add, edit, or delete rules for a Virtual Cloud Network (VCN) route table.

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. Under Resources, click Route Tables.
    4. Click the name of the route table you're interested in.
    5. If you want to create a route rule, click Add Route Rule, and enter the following information:
      • Target Type: See the list of target types in Overview of Routing for Your VCN. If the target type is a DRG, the VCN's attached DRG is automatically selected as the target, and you don't have to specify the target yourself. If the target is a private IP object, before you specify the target you must first disable the source/destination check on the VNIC that uses that private IP object. For more information, see Using a Private IP as a Route Target.
      • Destination CIDR Block: Available only if the target is not a service gateway. The value is the destination CIDR block for the traffic. You can provide a specific destination CIDR block, or use 0.0.0.0/0 if all traffic leaving the subnet needs to be routed to the target specified in this rule.
      • Destination Service: Available only if the target is a service gateway. The value is the service CIDR label that you're interested in.
      • Compartment: The compartment where the target is located.
      • Target: The target. If the target is a private IP object, enter its OCID. Or you can enter the private IP address itself, in which case the Console determines the corresponding OCID and uses it as the target for the route rule.
      • Description: An optional description of the rule.
    6. If you want to delete an existing rule, select the checkbox next to the rule, and then click Remove.
    7. If you wanted to edit an existing rule, select the checkbox next to the rule, and then click Edit.
  • Use the network route-table update command and required parameters to update the specified route table's display name or route rules:

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

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

  • Run the UpdateRouteTable operation to update the specified route table's display name or route rules.