Associating a Route Table with an Existing Service Gateway

Associate a route table with a service gateway.

You perform this task only if you're implementing an advanced transit routing scenario.

A service gateway can exist without a route table associated with it. However, after you associate a route table with a service gateway, there must always be a route table associated with it. But, you can associate a different route table. You can also edit the table's rules, or delete some or all the rules.

Prerequisite: The route table must exist and belong to the VCN that the service gateway belongs to.

    1. On the Virtual Cloud Networks list page, select the VCN that contains the gateway 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 Gateways tab, go to the Service Gateways section.
      • Under Resources, select Service Gateways.
    3. For the service gateway you're interested in, select the Actions menu (three dots), and then select Associate Route Table.
    4. Select a route table.
    5. Select Associate Route Table.
  • Use the network service-gateway update command and required parameters to assign or update a route table to a service gateway:

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

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateServiceGateway operation to associate a route table with a service gateway, using the routeTableId parameter.