Virtual Private Clouds (VPCs) in different accounts and regions are isolated from on-premises data center networks. This section describes how to enable network connectivity between an on-premises data center and a VPC across accounts and regions.
Background introduction
A data center in Beijing is connected to the cloud via a Direct Connect (DC) Connection in the nearest region. Now, you want to access from the data center to resources in a VPC in a different region and account via DC Connection.
Prerequisites
You have created a VPC (name: vpc-test) and its subnet in China (Shanghai) under Account B (account ID: 200****02), and purchased an Elastic Compute Service (ECS) instance within that VPC. For procedures, see Creating a VPC and Buying ECS instances. Procedure
Step 1: Create a DC Connection
In this example, the creation of DC Connection is completed. The DC Connection under the current account (Account B, ID: 200****01) is marked as "Opened". For procedure, see Creating a Direct Connect Connection. DAS230_port01_conn is the DC Connection in China (Beijing). Step 2: Create a DC Gateway
- Click Create DC Gateway to create a DC Gateway with the following configuration.
- Click Buy now to complete the action.
- Click Go to console to return to the Direct Connect Gateway console. You can view the new DC Gateway (dcg-test) in the DC Gateway list.
Step 3: Create a Virtual Interface
- Click Create DC Virtual Interface.
- Configure the Virtual Interface based on the table below.
warning
In this example, a BGP Peer is established along with the creation of the Virtual Interface. Once established, the BGP information (Peer ASN and BGP key) cannot be modified.
- Click Create to complete the action.
Step 4: Create a Cloud Enterprise Network
- Configure the CEN based on the table below.
- Click Create to complete the action. The ID of the new CEN is cen-rrhx580****1ri7. Record this ID, which is required for cross-account authorization.
Step 5: Authorize cross-account CEN
- In the VPC list, click the name of the target VPC: vpc-test.
- Click the CEN cross-account authorization tab, and then click CEN cross-account authorization.
- In the pop-up dialog box, type the information of the CEN under another account.
- After completion, click Attach.
Step 6: Load a network instance to the CEN
Load a VPC of another account
- Use Account A to log in to the CEN console. In the CEN instance list, click the name of the target instance: cen-01.
- In the Network Instances tab, click Attach Network Instance.
- The Attach Network Instance window pops up. Configure the information of the DC Gateway to be loaded.
Load a DC Gateway of my account
- Use Account A to log in to the CEN console. In the CEN instance list, click the name of the target instance: cen-01.
- In the Network Instances tab, click Attach Network Instance.
- The Attach Network Instance window pops up. Configure the information of the DC Gateway to be loaded.
Step 7: Purchase a bandwidth package and allocate inter-region bandwidth.
tip
This example is accessing resources in a VPC across accounts and regions. Cross-region access requires purchasing a CEN bandwidth package. If you are accessing resources in a VPC across accounts but in the same region, you can skip this step.
- Use Account A to log in to the CEN console. In the left-side navigation pane, click Bandwidth Package.
- Click Create BWP, and configure the bandwidth package based on the table below.
- Click Confirm order. After confirming the order is correct on its details page, follow the console guidance to review and accept the legal terms.
- Click Buy now to complete the bandwidth package creation.
- In the left-side navigation pane, click CEN Instances.
- Click the CEN Instance name (cen-01), and then click the Inter-region bandwidth tab in the details page.
- In the Inter-region bandwidth zone, click Allocate inter-region bandwidth. Allocate bandwidth across regions based on the table below.
- Click Create to complete configuration.
Step 8: Configure local routing and BFD
Configure routing and BFD on a local switch.
tip
Configuration commands are vendor-specific. These commands are for reference only. Adjust commands based on your device model. For details, consult your device vendor.
Reference commands
Step 9: Test connectivity
- Log in to any server within 192.168.1.0/24 of your on-premises data center.
- Run the following command. A successful Ping indicates the data center is properly connected to the VPC network across accounts and regions.