This section describes how to enable data interchange between multiple Virtual Private Clouds (VPCs) via Direct Connect (DC) and Cloud Enterprise Network (CEN).
tip
This scenario applies when multiple VPCs in the same region cannot interconnect directly through CENs.
An enterprise has activated multiple cloud services in China (Beijing), deployed in VPC-01 and VPC-02 respectively. The business switches in the on-premises data center support interconnection. The enterprise expects VPC-01 (CIDR block: 10.122.100.0/24) to communicate through the DC with VPC-02 (CIDR block: 100.122.200.0/24). We recommend using multiple CENs and DC Gateways with custom Autonomous System Number (ASN) to interconnect cloud and on-premises services, enabling data intercommunication by on-premises switches. The overall network design is shown in the diagram below:
Network planning
tip
- Both custom ASNs for DC Gateways must be different and neither can be 137718.
- If the DC is connected to different switches, ensure network connectivity between the two switches.
- You have created VPCs (VPC-01 and VPC-02) and their subnets. For specific procedure, see Creating a VPC.
- You have planned CIDR blocks to avoid conflicts between VPC-01 and VPC-02. For more about network planning, see Network planning and design.
Step 1: Create a DC Connection
- Between the data center and VPC-01: DAS235_port01_conn in China (Beijing);
- Between the data center and VPC-02: DAS681_port01_conn in China (Beijing).
Step 2: Create a DC Gateway
- In the top menu bar, select the region: China (Beijing).
- Click Create DC Gateway.
- Configure the DC Gateway (dcg-01) based on the table below.
- After confirming all parameters are correct, 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-01) in the DC Gateway list.
- Repeat steps 1 to 6 to create another DC Gateway (dcg-02), with configurations listed in the table below.
Step 3: Create a Virtual Interface
- Click Create DC Virtual Interface.
- See the table below to configure the Virtual Interface of the DC Connection: DAS235_port01_conn (DC-01).
- Click Create to complete the action.
- Repeat steps 1 to 4 to create a Virtual Interface for another DC Connection: DAS681_port01_conn (DC-02), with configurations listed in the table below.
Step 4: Create a CEN and load the network instance
- Configure the CEN Instance based on the table below and load the VPC instance: VPC-01.
- Click Create to complete the action.
- In the list of CEN instances, click the target instance's name: 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 instance to be loaded, and then click Attach to complete the action.
- Repeat steps 1 to 7 to create another CEN (CEN-02) and load VPC-02, with configurations listed in the table below.
- Repeat steps 5 to 7 to load the DC Gateway (dcg-02) into CEN-02, with configurations listed in the table below.
Step 5: Add a security group rule to a VPC
Allow the IPs of the on-premises data center and peer VPCs in the security groups of both VPC-01 and VPC-02.
- In the top menu bar, select the region: China (Beijing).
- In the VPC list, search for the target VPC: VPC-01.
- Click VPC-01 to enter its details page, then click Security Group.
- In the security group list, click Edit rule in the Actions column of the target security group.
- On the Access rules tab, select Inbound rules, and click Add rule.
- Add two inbound rules based on the image below, allowing CIDR blocks of the data center (192.168.1.0/24) and VPC-02 (100.122.200.0/24) to access VPC-01.
- Repeat steps 1 to 6, add two inbound rules in VPC-02’s security group, allowing CIDR blocks of the data center (192.168.1.0/24) and VPC-01 (10.122.100.0/24) to access VPC-02.
Step 6: Configure on-premises routing
Configure routing and BFD on the on-premises data center. Using the example of connecting two DC Connections to two switches (assumed Switch 1 and Switch 2) on the data center, this demonstrates how to configure BGP route and BFD separately on both switches.
Reference commands
Configuration on Switch 1 of the data center:
bgp 46500 //46500 is the BGP neighbor ASN on the local IDC side.
peer 10.122.100.1 as-number 64512 //10.122.100.1 is the local (cloud gateway) peer IP address of DC-01; 64512 is the ASN of dcg-01.
peer 10.122.100.1 password simple 123456**** //BGP key.
network 192.168.1.0 255.255.255.0 // Private CIDR block and subnet mask of the IDC.
interface HGE1/1/1 // DC interface
bfd detect multiplier 3 // BFD detection time multiplier.
bfd min-transmit-interval 1000 //The minimum interval for sending single-hop BFD control packets.
bfd min-receive-interval 1000 // The minimum interval for receiving single-hop BFD control packets.
Configuration on Switch 2 of the data center:
bgp 46500 //46500 is the BGP neighbor ASN on the local IDC side.
peer 100.122.200.3 as-number 65534 //100.122.200.3 is the local (cloud gateway) peer IP address of DC-02. 65534 is the ASN of dcg-02.
peer 100.122.200.3 password simple 123456**** //BGP key.
network 192.168.1.0 255.255.255.0 //Private CIDR block and mask of on-premises IDC-01.
interface HGE1/1/1 // DC interface.
bfd detect-multiplier 3 // BFD detect multiplier.
bfd min-transmit-interval 1000 //Minimum interval for sending single-hop BFD control packets.
bfd min-receive-interval 1000 //Minimum interval for receiving single-hop BFD control packets.
Step 7: Test connectivity
Log in to any Elastic Compute Service (ECS) instance under VPC-01 in China (Beijing). Ping the IP address (within the interconnected CIDR block) of an ECS instance in VPC-02. A successful ping response confirms network connectivity between VPC-01 and VPC-02.