All Products
Search
Document Center

OpenSearch:Connect multiple VPCs using CEN (non-overlapping CIDR blocks)

Last Updated:Jul 17, 2026

Scenario example

You have two virtual private clouds (VPCs) named vpc1 and vpc2 in the China (Shanghai) region and a VPC named vpc3 in the China (Qingdao) region. The CIDR blocks of the three VPCs do not conflict with each other. An OpenSearch Retrieval Engine Edition instance is created in vpc1.

To access the internal endpoint of the OpenSearch instance from vpc2 in the China (Shanghai) region and vpc3 in the China (Qingdao) region, you can configure transit routers for a Cloud Enterprise Network (CEN) instance.

Region

VPC

CIDR block

China (Shanghai)

vpc1

10.0.0.0/10

  • vSwitch 1 in Zone F

  • vSwitch 2 in Zone G

vpc2

10.0.0.0/8

  • vSwitch 1 in Zone F

  • vSwitch 2 in Zone G

China (Qingdao)

vpc3

172.16.0.0/12

  • vSwitch 1 in Zone H

  • vSwitch 2 in Zone I

Obtain the IP address of the OpenSearch Retrieval Engine Edition instance

In the OpenSearch console, go to the details page of the OpenSearch Retrieval Engine Edition instance, copy the endpoint, and ping it to obtain the IP address. In this example, the IP address is 100.103.8.57.

Create a CEN instance and connect VPCs

Access from multiple VPCs in the same region

Use CEN to connect the two VPCs to a transit router in the China (Shanghai) region so that they can communicate with each other.

  1. Log on to the CEN console and create a CEN instance.

  2. Create a transit router in the desired region. In this example, a transit router is created in the China (Shanghai) region.

  3. Create connections for vpc1 and vpc2 on the transit router.

    On the network connection page, use the settings in the following table, and then click OK.

    Parameter

    Description

    vpc1

    vpc2

    Instance Type

    Select the type of the network instance that you want to connect.

    VPC

    VPC

    Region

    Select the region of the network instance.

    China (Shanghai)

    China (Shanghai)

    Transit Router

    The ID of the transit router in the selected region is automatically displayed.

    Account

    Select the Alibaba Cloud account to which the network instance belongs.

    Your Account

    Your Account

    Billing Method

    The default value is Pay-as-you-go.

    Connection Name

    Enter a name for the network connection.

    Connection_VPC1

    Connection_VPC2

    Networks

    Select the network instance that you want to connect to the transit router.

    vpc1

    vpc2

    vSwitch

    Select a vSwitch in a zone of the transit router.

    If each zone of the transit router has a vSwitch, you can select multiple zones and select a vSwitch in each of the zones to enable zone-disaster recovery.

    • China (Shanghai) Zone F: Select vSwitch 1.

    • China (Shanghai) Zone G: Select vSwitch 2.

    • China (Shanghai) Zone F: Select vSwitch 1.

    • China (Shanghai) Zone G: Select vSwitch 2.

    Advanced Configuration

    Keep the default settings for vpc1 and vpc2. All advanced features are enabled for the VPCs.

Access from multiple VPCs in different regions

  1. Log on to the CEN console and create a CEN instance.

  2. Create transit routers in the desired regions. In this example, a transit router is created in each of the China (Shanghai) and China (Qingdao) regions.

  3. Create connections for VPCs on the transit routers.

    Connect vpc1 to the Enterprise Edition transit router in the China (Shanghai) region, and connect vpc3 to the Enterprise Edition transit route in the China (Qingdao) region.

    1. Find the target CEN instance and click its ID. In the Actions column, click Create Connection.

    2. On the Connection with Peer Network Instance page, use the settings in the following table and then click OK.

      Parameter

      Description

      vpc1

      vpc3

      Instance Type

      Select the type of the network instance that you want to connect.

      VPC

      VPC

      Region

      Select the region of the network instance.

      China (Shanghai)

      China (Qingdao)

      Transit Router

      The ID of the transit router in the selected region is automatically displayed.

      Account

      Select the Alibaba Cloud account to which the network instance belongs.

      Your Account

      Your Account

      Billing Method

      The default value is Pay-as-you-go.

      Connection Name

      Enter a name for the network connection.

      Connection_VPC1

      Connection_VPC3

      Networks

      Select the network instance that you want to connect to the transit router.

      vpc1

      vpc3

      vSwitch

      Select a vSwitch in a zone of the transit router.

      If each zone of the transit router has a vSwitch, you can select multiple zones and select a vSwitch in each of the zones to enable zone-disaster recovery.

      • China (Shanghai) Zone F: Select vSwitch 1.

      • China (Shanghai) Zone G: Select vSwitch 2.

      • China (Qingdao) Zone H: Select vSwitch 1.

      • China (Qingdao) Zone I: Select vSwitch 2.

      Advanced Configuration

      Keep the default settings for vpc1 and vpc3. All advanced features are enabled for the VPCs.

  4. Create an inter-region connection.

    The transit routers for vpc1 and vpc3 are in different regions. By default, VPCs in different regions cannot communicate. You must create an inter-region connection between the Enterprise Edition transit routers in the China (Qingdao) and China (Shanghai) regions to enable communication between vpc1 and vpc3.

    1. On the CEN Instance page, find the target CEN instance and click its ID.

    2. On the Basic Information > Transit Router tab, find a transit router and, in its Actions column, click Create Connection.

    3. On the Connection with Peer Network Instance page, configure the inter-region connection and then click OK.

    Parameter

    Description

    Network Type

    Select Inter-region Connection.

    Region

    Select one of the regions to be connected.

    In this example, China (Qingdao) is selected.

    Peer Region

    Select the other region to be connected.

    In this example, select China (Shanghai).

    Bandwidth Allocation Mode

    Select the method that is used to allocate bandwidth to the inter-region connection.

    In this example, select Pay-By-Data-Transfer. You are billed based on the actual data transferred over the inter-region connection.

    Bandwidth

    Specify a bandwidth value for the inter-region connection. Unit: Mbit/s.

    If you select Pay-By-Data-Transfer for Bandwidth Allocation Mode, this parameter specifies the rate limit for the inter-region connection.

    Default Line Type

    Select a line type for the inter-region connection.

    In this example, the default value is used. For more information about line types, see Line types.

    Advanced Settings

    By default, the advanced features are enabled. In this example, the default settings are retained.

Configure routes for the OpenSearch Retrieval Engine Edition instance

Add route entries to direct traffic from vpc2 and vpc3 to the OpenSearch instance through the Enterprise Edition transit router. The vpc2 configuration covers the same-region scenario, and the vpc3 configuration covers the cross-region scenario.

  1. Log on to the VPC console. In the left-side navigation pane, click Route Tables. On the page that appears, find the system route table of vpc2 (intra-region access) or vpc3 (inter-region access) and click its ID.

  2. On the Custom Route tab of the page that appears, click Add Route Entry. In the Add Route Entry dialog box, configure the parameters and click OK. In this example, set Destination CIDR Block to 100.103.8.57, Next Hop Type to Transit Router, and Transit Router to the transit router of vpc1.

  3. Log on to the CEN console. On the Instances page, find the transit router in the China (Shanghai) region (intra-region access) or in the China (Qingdao) region (inter-region access) and click its ID.

  4. On the Route Table tab, click Create Route Entry and add a route entry for the destination 100.103.8.57. Set the next hop to the network connection that corresponds to vpc1.

Verify the result

  1. In the VPC console, find the vpc2 or vpc3 instance. In the Elastic Compute Service column, click the plus sign (+) to create an ECS instance. After the instance is created, run the following curl command in the terminal to verify the connection. Replace {username}, {password}, and {instanceId} with your actual values.

    curl -i -u "{username}:{password}" http://{instanceId}.ha.aliyuncs.com/network/active
  1. If the following result is returned, the network connection is established:

    HTTP/1.1 200 OK
    Server: Tengine
    Date: Tue, 26 Nov 2024 08:29:34 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 0
    Connection: keep-alive
    Keep-Alive: timeout=320
    X-Request-Id: 037a9080181d0b90b8c99b25af7e****

    If a 403 Forbidden error is returned, it indicates a network issue. Contact us for support.