Configuring VCN Route Tables to Use an LPG
Update a Virtual Cloud Network (VCN) route table to include a new rule that directs traffic destined for the other VCN's CIDR to flow through your local peering gateway (LPG).
Without the required routing, traffic doesn't flow between the peered LPGs. If a situation occurs in which you need to temporarily stop the peering, you can simply remove the route rules that enable traffic, you don't need to delete the LPGs.
Each administrator can perform this task before or after the connection is established.
Prerequisite: Each administrator must have the CIDR block or specific subnets for the other VCN. If the connection is already established, look at the Peer VCN CIDR Block value for your LPG in the Console. Otherwise, get the information from the other administrator by email or other method.
Determine which subnets in your VCN need to communicate with the other VCN. You need to update the route table for each of those subnets to include a new rule that directs traffic destined for the other VCN's CIDR to your LPG.
Route tables with route rules that use an LPG as the next hop can be associated with subnets in the VCN, or a DRG, but not to internet gateways, NAT gateways or service gateways. For more about VCN routing, refer to Overview of Routing for Your VCN or the Learn routing in OCI Networking with examples (PDF) technical brief.
Any subnet traffic with a destination that matches the rule is routed to your LPG. For general information about setting up route rules, see VCN Route Tables.
If you no longer need the peering and want to delete your LPG, you must first delete all the route rules in your VCN that specify the LPG as the target.
Use the network route-table update command and required parameters to update the specified route table's route rules:
oci network route-table update --rt-id ocid ... [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the UpdateRouteTable operation to update the specified route table's route rules.