This topic describes how to use Basic Edition transit routers to connect virtual private clouds (VPCs) that are deployed in the same region.

Regions that support Basic Edition transit routers

Table 1. Regions that support Basic Edition transit routers
Area Region
Chinese mainland Chinese mainland CCN
Asia Pacific South Korea (Seoul), Japan CCN, Singapore CCN, Hong Kong CCN, Malaysia CCN, and Indonesia CCN
Europe Frankfurt CCN
Australia Australia CCN

Scenario

A company has deployed two VPCs (VPC1 and VPC2) in the China (Guangzhou) region. Elastic Compute Service (ECS) instances are deployed in the VPCs. The two VPCs cannot communicate with each other. Due to business growth, the company wants to enable the two VPCs to communicate with each other.

In this case, the company can use Cloud Enterprise Network (CEN) to connect the two VPCs to the Basic Edition transit router in the China (Guangzhou) region. Then, the two VPCs can communicate with each other.

Use Basic Edition transit routers to connect VPCs in the same region

Prerequisites

  • Two VPCs are deployed in the China (Guangzhou) region. ECS instances are deployed in the VPCs. For more information, see Create an IPv4 VPC.
    The following table shows how CIDR blocks are allocated to the VPCs. Make sure that the CIDR blocks do not overlap.
    Network instance CIDR block Network instance region ECS instance IP address
    VPC1
    • VPC CIDR block: 192.168.0.0/16
    • vSwitch CIDR block: 192.168.0.0/24
    China (Guangzhou) 192.168.0.239
    VPC2
    • VPC CIDR block: 10.0.0.0/16
    • vSwitch CIDR block: 10.0.0.0/24
    China (Guangzhou) 10.0.0.97
  • You must be aware of the security group rules that are applied to the ECS instances in the VPCs. Make sure that the security group rules allow the VPCs to communicate with each other. For more information, see Query security group rules and Add security group rules.

Procedure

Procedure - Use Basic Edition transit routers to connect VPCs in the same region

Step 1: Create a CEN instance

  1. Log on to the CEN console.
  2. On the Instances page, click Create CEN Instance.
  3. In the Create CEN Instance panel, set the following parameters and click OK.
    • Name: Enter a name for the CEN instance.

      The name must be 2 to 128 characters in length and can contain digits, hyphens (-), and underscores (_). It must start with a letter.

    • Description: Enter a description for the CEN instance.

      The description must be 2 to 256 characters in length, and cannot start with http:// or https://. You can leave this parameter empty.

Step 2: Connect the VPCs to the transit router

Connect the VPCs to the transit router in the China (Guangzhou) region. Then, the VPCs automatically learn routes from each other to establish network communication.

  1. On the Instances page, click the ID of the CEN instance that you want to manage.
  2. On the Basic Information tab, click Add in the VPC section.
    Connect to the VPC
  3. On the Connection with Peer Network Instance page, set the following parameters and click OK.
    • Network Type: Select VPC.
    • Region: Select the region where the network instance is deployed. In this example, China (Guangzhou) is selected.
    • Transit Router: The system automatically creates a transit router in the selected region.
    • Resource Owner ID: Select the Alibaba Cloud account to which the VPC belongs. In this example, Your Account is selected.
    • Networks: Select the ID of the network instance. In this example, VPC1 is selected.
  4. Repeat Step 3 to connect VPC2 to the transit router in the China (Guangzhou) region.
    After both VPCs are connected to the transit router, they can automatically learn routes from each other, as shown in the following figure. You can manage the routes of the VPCs in the VPC console. For more information, see Work with route tables.
    Figure 1. Routes learned by VPC1
    Routes learned by VPC1
    Figure 2. Routes learned by VPC2
    Routes learned by VPC2

Step 3: Test network connectivity

After VPC1 and VPC2 are connected to the transit router, they can communicate with each other. In the following example, VPC1 is used to test the network connectivity between VPC1 and VPC2.

  1. Log on to the ECS instance that is deployed in VPC1. For more information, see Connection methods.
  2. On the ECS instance, run the ping command to test the network connectivity between VPC1 and VPC2.
    Note In this example, VPC1 runs the Alibaba Cloud Linux operating system. For more information about how to use the ping command in other operating system, see the manual of the operating system that you use.
    ping <The IP address of the ECS instance in VPC2>  

    The following echo reply packet indicates that VPC1 and VPC2 are connected.

    Use Basic Edition transit routers to connect VPCs in the same region - test network connectivity