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 a VCN and subnets, see VCN Route Tables.
    1. On the Virtual Cloud Networks list page, select the VCN that contains the route table 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:
      • Select the Routing tab.
      • Under Resources, select Route Tables.
    3. Select the name of the route table you're interested in.
    4. On the route table details page, perform one of the following actions depending on the option that you see:
      • Select the Route Rules tab.
      • Under Resources, select Route Rules.
    5. To create a route rule, select Add Route Rules, and enter the following information:
      • Target Type: See the list of target types in Overview of Routing for a 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 isn't 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 containing the target.
      • 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 finds the corresponding OCID and uses it as the target for the route rule.
      • Description: An optional description of the rule.
    6. To delete an existing rule, depending on the option that you see:
      • Select the checkbox next to the rule, select Actions, and then select Remove.
      • Select the checkbox next to the rule, and then select Remove.
    7. To edit an existing rule, depending on the option that you see:
      • Select the checkbox next to the rule, select Actions, and then select Edit.
      • Select the checkbox next to the rule, and then select 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.