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 of the rules.

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

    1. In the Console, confirm you're viewing the compartment that contains the VCN with the SGW you're interested in. For information about compartments and access control, see Access Control.
    2. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    3. Click the name of the VCN that has the SGW you're interested in.
    4. On the left side of the page, click Service Gateways.
    5. For the service gateway you're interested in, click the Actions menu (Actions Menu), and then click Edit.
    6. (Optional)

  • 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.