Updated on 2024-01-16 GMT+08:00

Overview

Background

There are two VPCs in region A. The two VPCs need to access each other and share the same Direct Connect connection to access an on-premises data center.

To do this, we can create an enterprise router in region A, and attach the two VPCs and the virtual gateway of the Direct Connect connection to the enterprise router. The enterprise router can forward traffic among the attached VPCs and the virtual gateway, and the two VPCs can share the Direct Connect connection.

Figure 1 Networking between an on-premises data center and VPCs

Operation Procedure

Figure 2 shows the procedure for using an enterprise router to connect an on-premises data center with VPCs.

Figure 2 Flowchart for connecting an on-premises data center with VPCs
Table 1 Description of procedures for connecting an on-premises data center with VPCs

No.

Procedure

Description

1

Planning Networks and Resources

Plan required CIDR blocks and the number of resources.

2

Creating Resources

  1. Create an enterprise router.
  2. Create two VPCs and two ECSs.
  3. Create a Direct Connect connection. The connection is dedicated to connect an on-premises data center to the cloud over a line you lease from a carrier.

3

Configuring Networks

  1. Configure VPC attachments for the enterprise router:
    1. Attach the two VPCs to the enterprise router.
    2. Add routes to the route tables of the VPCs for traffic to route through the enterprise router.
  2. Configure a virtual gateway attachment for the enterprise router:
    1. Create a virtual gateway that is associated with the enterprise router. The virtual gateway attachment is automatically added to the enterprise router.
    2. Create a virtual interface to associate the virtual gateway with the Direct Connect connection.
    3. Configure routes on the router of the on-premises data center.

4

Verifying Connectivity Between the On-premises Data Center and VPCs

Log in to an ECS and run the ping command to verify the network connectivity between the on-premises data center and VPCs.