Create a Dynamic Routing Gateway

Create a dynamic routing gateway (DRG) to connect your on-premises network to the virtual cloud network (VCN).

After you create the gateway, you must attach the gateway to the VCN and add a rule to a subnet's routing table to drive traffic to the DRG.

Create a Dynamic Routing Gateway

Create a dynamic routing gateway (DRG) to connect your on-premises network to the virtual cloud network (VCN).

  1. From the console, open the navigation menu and under Core Infrastructure click Networking and then click Dynamic Routing Gateways.
  2. Choose a compartment you have permission to work in (on the lower left side of the page). The page updates to display only the resources in that compartment.
  3. Click Create Dynamic Routing Gateway.

    Enter the following items:

    • Create in Compartment: The compartment where you want to create the gateway, if different from the compartment you're currently working in.
    • Name: A descriptive name for the gateway. It doesn't have to be unique, and it cannot be changed later in the Console (but you can change it with the API). Avoid entering confidential information.
    • Tags: Optionally, you can apply tags. If you have permissions to create a resource, you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace.
  4. Click Create Dynamic Routing Gateway.

Attach the Dynamic Routing Gateway to the Virtual Cloud Network

You must attach the dynamic routing gateway (DRG) to a virtual cloud network (VCN).

A VCN can be attached to only one DRG at a time, and a DRG can be attached to only one VCN at a time. The attachment is automatically created in the compartment that holds the VCN.

  1. From the console, open the navigation menu and under Core Infrastructure, click Networking and then click Dynamic Routing Gateways.
  2. Click the DRG you want to attach.
  3. Under Resources, click Virtual Cloud Networks. If you want to attach the DRG to a VCN in a different compartment than the one you're working in, choose that compartment from the list on the left side of the page.
  4. Click Attach to Virtual Cloud Network.
  5. Select the VCN.
  6. Click Attach to Virtual Cloud Network.

The attachment will be in the "Attaching" state for a short period before it's ready.

Route Traffic to the Dynamic Routing Gateway

For each subnet that must send traffic to the DRG, you must add a rule to the route table associated with that subnet.

  1. From the console, open the navigation menu and under Core Infrastructure, click Networking and then click Virtual Cloud Networks.
  2. Click the VCN you're interested in.
  3. Under Resources, click Route Tables.
  4. Click the route table you're interested in.
  5. Click Add Route Rule:
    • Target Type: Select dynamic routing gateway (DRG). The VCN's attached DRG is automatically selected as the target.
    • Destination CIDR Block: Enter 0.0.0.0/0. If you want to limit the rule to a specific network (for example, your on-premises network), then use that network's CIDR instead of 0.0.0.0/0. A value of 0.0.0.0/0 means that all non-intra-VCN traffic that is not already covered by other rules in the route table will go to the target specified in this rule.
    • Destination Service: Only if the target is a service gateway. The value is the service CIDR label that you're interested in.
    • Compartment: The compartment where the target is located.
    • Target: The target. If the target is a private IP, enter its OCID. Or you can enter the private IP address itself, in which case the Console determines the corresponding OCID and uses it as the target for the route rule.
    • Description: An optional description of the rule.