edit-icon download-icon

Establish an intranet connection between VPCs under different accounts

Last Updated: Jan 08, 2018

This tutorial illustrates how to use Express Connect to connect two VPCs under different accounts. To connect two VPCs under different accounts, you must create an initiator router interface and a receiver router interface individually, then initiate the connection, and at last configure the routing.

The following are two VPCs used in this tutorial.

ConfigurationAccount AAccount B
VPC ID vpc-12345678 (VPC A) vpc-87654321 (VPC B)
Region China North 2 (Beijing) China East 1 (Hangzhou)
Router ID vrt-AAA vrt-BBB
VPC CIDR Block 192.168.0.0/16 172.16.0.0/12
VSwitch CIDR Block 192.168.100.0/24 172.16.100.0/24

Prerequisite

  • The VSwitch CIDR blocks of the two VPCs cannot conflict with each other.
  • The Alibaba Cloud account IDs and router IDs of the two parties have been obtained.

Step 1: Create the initiator

To build Express Connect, you need to create an initiator router interface on one VPC and create a receiver router interface on the other VPC, and the initiator will initiate the VPC connection.

Follow these steps to create the initiator router interface in the VPC under account A:

  1. Use account A to log on to the Express Connect console.

  2. In the left-side navigation pane, click VPC Connection > Router Interface.

  3. Click Create Router Interface to create a router interface according to the following configurations. For more information, see Create a router interface.

    • Billing Method: Select Subscription.

    • Scenario: Select VPC Interconnection.

    • Router Creation: Select Create Initiator.

    • Local Region: Select the region where the VPC is located. In this tutorial, select China North 2 (Beijing).

    • VPC ID: Select the VPC to be connected. In this tutorial, select the ID of VPC A.

    • Peer Region: Select the region where the peer VPC is located. In this tutorial, select China East 1 (Hangzhou).

    • Specification: Select the specification for the initiator. In this tutorial, select Large 1.

      buy

  4. Click Buy Now to complete the creation. Then go back to the Router Interface page after about one minute, and choose China North 2 (Beijing) region. Then you can see the router interface of account A. In this tutorial, ri-AAA is used to represent the router interface ID of account A.

    buy

Step 2: Create the receiver

Follow these steps to create the receiver router interface in the VPC under account B:

  1. Use account B to log on to the Express Connect console.

  2. In the left-side navigation pane, click VPC Connection > Router Interface.

  3. Click Create Router Interface to create a router interface according to the following configurations. For more information, see Create a router interface.

    • Billing Method: Select Pay-As-You-Go.

    • Scenario: Select VPC Interconnection.

    • Router Creation: Select Create Receiver.

    • Local Region: Select the region where the VPC is located. In this tutorial, select China East 1 (Hangzhou).

    • VPC ID: Select the VPC to be connected. In this tutorial, select the ID of VPC B.

    • Peer Region: Select the region where the peer VPC is located. In this tutorial, select China North 2 (Beijing).

      receiver

  4. Click Buy Now to complete the creation. Then go back to the Router Interface page after about one minute, and choose China East 1 (Hangzhou) region. Then you can see the router interface of account B. In this tutorial, ri-BBB is used to represent the router interface ID of account B.

Step 3: Add peer router interfaces and initiate the connection

Follow these steps to add the peer router interface for each router interface and initiate the connection:

  1. Use account B to log on to the Express Connect console.

  2. On the Router Interface page, select More > Edit Peer Interface in the Actions column of the router interface ri-BBB.

  3. In the displayed dialog box, configure the peer router interface for account B as follows:

    • Peer Account ID: The ID of the peer account. In this tutorial, enter account A.

    • Peer VRouter ID: The ID of the peer VRouter. In this tutorial, enter vrt-AAA.

    • Peer Router Interface ID: The ID of the peer router interface. In this tutorial, enter ri-AAA.

  4. Click OK.

  5. Repeat the preceding steps to configure the peer router interface for account A.

  6. Return to the router interface page, click Initiate a Connection in the in the Actions column of the router interface ri-AAA. The connection is established successfully when the status of the router interfaces ri-AAA and ri-BBB changes to Active.

Step 4: Configure the routes

After creating the router interfaces, follow these steps to configure the routes for the two VPCs:

  1. On the Router Interface page, click Router Configuration next to the target router interface.

    route configuration

  2. Click Add Route Entry.

  3. In the displayed dialog box, configure the route according to the following information:

    • Destination CIDR Block: The CIDR Block of the peer VPC.

    • Next Hop Type: Select Router Interface.

    • Router Interface: Select General Routing and select a router interface.

  4. Repeat the preceding steps to configure the route for the peer router interface. In this tutorial, the router configurations are as follows:

    Destination CIDR BlockNext Hop TypeDescription
    172.16.100.0/24 (VSwitch CIDR block of VPC B)Router interface of VPC ARoute configuration of VPC A
    192.168.100.0/24 (VSwitch CIDR block of VPC A)Router interface of VPC BRoute configuration of VPC B
Thank you! We've received your feedback.