Associating a Route Table with an Existing LPG

To use transit routing, you must associate a route table to an LPG after you create the LPG.

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

This task is related to an advanced routing scenario called transit routing. Associating a route table to an LPG influences the behavior of traffic entering the VCN through the LPG.

An LPG can exist without having an associated route table. After you associate a route table with an LPG 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 rules.

Note

The route rules in a route table associated with an LPG can point to a DRG or a private IP address in the same VCN as the LPG.
    1. On the Virtual Cloud Networks list page, select the VCN that contains the requestor LPG 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 Local Peering Gateways section.
      • Under Resources, select Local Peering Gateways.
    3. For the LPG you're interested in, select the Actions menu Actions Menu, and then select either: 
      • Associate With Route Table: If the LPG has no route table associated with it yet.
      • Replace Route Table Association: If you're changing which route table is associated with the LPG.
    4. Select the compartment where the route table resides.
    5. Select the route table itself.
    6. Select Associate.
  • Use the network local-peering-gateway update command and required parameters to change the name and associated route table of a local peering gateway (LPG):

    oci network local-peering-gateway update --local-peering-gateway-id ocid --route-table-id ocid ... [OPTIONS]

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

  • Run the UpdateLocalPeeringGateway operation to set the routeTableId to associate a route table to an LPG.