Help Center> Cloud Connect> Best Practices> Connecting Two VPCs in Different Regions
Updated on 2022-08-15 GMT+08:00

Connecting Two VPCs in Different Regions

Scenarios

Your company has two branches, one in Beijing and the other in Hong Kong, and you have created a VPC for each branch. If the two branches require private network communications, what you need is a cloud connection that links the VPC in the CN North-Beijing4 region to the VPC in the CN-Hong Kong region.

Figure 1 Communications between VPCs in different regions

Solution Design

Steps for Cross-Region Communication

  1. Apply for a cross-border permit.
  2. Create a cloud connection.
  3. Load the two VPCs.
  4. Buy a bandwidth package.
  5. Assign inter-region bandwidth.
  6. Check the routes and related configuration.
Table 1 Resource information

Region

VPC

Subnet

Other CIDR Block

CN North-Beijing4

VPC-01

subnet-1 (192.168.1.0/24)

192.168.44.0/24

CN-Hong Kong

VPC-e725

subnet-e730 (192.168.0.0/24)

192.168.11.0/24

Prerequisites

Applying for a Cross-Border Permit

  1. Prepare all required materials.

    1. Log in to the management console.
    2. Hover on the upper left corner to display Service List and choose Networking > Cloud Connect.
    3. In the navigation pane on the left, choose Cloud Connect > Cross-Border Permit.
    4. Click Download Materials.
    5. Print and sign the Cloud Connect Cross-Border Circuit Service Agreement and China Unicom Letter of Commitment to Information Security of the Cross-Border Circuit Service, and stamp your company's official seal.
    6. Prepare a scanned copy of your company's business license, of the Cloud Connect Cross-Border Circuit Service Agreement, and of the China Unicom Letter of Commitment to Information Security of the Cross-Border Circuit Service. Ensure that all materials are stamped with your company's official seal.

  2. Submit an application.

    1. Log in to the management console.
    2. Hover on the upper left corner to display Service List and choose Networking > Cloud Connect.
    3. In the navigation pane on the left, choose Cloud Connect > Cross-Border Permit.
    4. Click Submit Application.
    5. Fill in the enterprise and representative information, and upload the prepared materials.
    6. Click Submit.

      After you submit the application, the status will change to Pending approval. The review takes about one working day. When the status changes to Approved, you can buy bandwidth packages.

Procedure

  1. Create a cloud connection.
    1. Log in to the management console.
    2. Hover on the upper left corner to display Service List and choose Networking > Cloud Connect.
    3. In the navigation pane on the left, choose Cloud Connect > Cloud Connections.
    4. Click Create Cloud Connection.
    5. On the displayed Create Cloud Connection dialog box, configure the parameters and click OK.
  2. Load network instances.
    1. Locate the cloud connection, cloudconnect-001, and click its name.
    2. Click Load Network Instance.
    3. Configure other parameters based on Table 2 and then click OK.
      Table 2 Parameters required for loading network instances

      Parameter

      Description

      Account

      Specifies whether the network instance is in the current account or another account.

      Region

      Specifies the region where the VPC you want to connect is located.

      Instance Type

      Specifies the type of the network instance you want to load to the cloud connection.

      Two options are available, VPC and Virtual gateway.

      VPC

      Specifies the VPC you want to load to the cloud connection.

      This parameter is mandatory if you have set Instance Type to VPC.

      VPC CIDR Block

      Specifies the subnets of the VPC you want to load and the custom CIDR blocks.

      If you have set Instance Type to VPC, configure the following two parameters:

      • Subnet: Select one or all subnets of the VPC.
      • Other CIDR Block: Add one or more custom CIDR blocks as needed.
      Figure 2 Loading network instances
    4. In the dialog box indicating that the loading is successful, click Load Another Instance, configure the parameters based on Table 2, and then click OK.
  3. Buy a bandwidth package.
    By default, the system allocates 10 kbit/s of bandwidth for testing network connectivity across regions. To ensure normal network communications between regions in the same geographic region or across geographic regions, you need to purchase a bandwidth package and bind it to a cloud connection.
    1. Hover on the upper left corner to display Service List and choose Networking > Cloud Connect.
    2. In the navigation pane on the left, choose Cloud Connect > Bandwidth Packages.
    3. Click Buy Bandwidth Package.
    4. Configure the parameters based on Table 3 and click Buy Now.
      Table 3 Parameters required for buying a bandwidth package

      Parameter

      Description

      Billing Mode

      Specifies how you want the bandwidth package to be billed.

      You can purchase it by year or month as needed.

      Name

      Specifies the bandwidth package name.

      The name can contain 1 to 64 characters, including digits, letters, hyphens (-), underscores (_), and periods (.).

      Billed By

      Specifies by what you want the bandwidth package to be billed.

      Applicability

      Specifies whether you want to use the bandwidth package for network communications within a geographic region or between geographic regions.

      Two options are available:

      • Single Geographic Region: Use the bandwidth package between regions in the same geographic region.
      • Across Geographic Regions: Use the bandwidth package between regions in different geographic regions.

      Geographic Region

      Specifies the geographic region.

      Bandwidth

      Specifies the bandwidth you require for network communications across regions, in Mbit/s. The sum of all inter-region bandwidths you assign cannot exceed the total bandwidth of the bandwidth package. Assign the bandwidth based on your network plan.

      Tag

      Identifies the bandwidth package. A tag consists of a key and a value. You can add a maximum of 10 tags to a bandwidth package.

      Tag keys and values must meet the requirements listed in Table 4.

      NOTE:

      If a predefined tag has been created on TMS, you can directly select the corresponding tag key and value.

      For details about predefined tags, see Predefined Tags.

      Required Duration

      Specifies how long you require the bandwidth package for.

      Auto renewal is supported.

      Cloud Connection

      Specifies the cloud connection you want to bind the bandwidth package to.

      Two options are available, Bind now and Bind later.

      Table 4 Tag key and value requirements

      Parameter

      Requirements

      Key

      • Cannot be left blank.
      • Must be unique for each resource.
      • Can contain a maximum of 36 characters.
      • Can contain only letters, digits, hyphens, underscores, and Unicode characters from \u4e00 to \u9fff.

      Value

      • Can be left blank.
      • Can contain a maximum of 43 characters.
      • Can contain only letters, digits, period, hyphens, underscores, and Unicode characters from \u4e00 to \u9fff.
    5. Confirm the information and click Pay Now.
    6. Click Pay.

      Go back to the bandwidth package list and locate the bandwidth package. If its status changes to Normal, you can bind the bandwidth package to a cloud connection.

  4. Assign inter-region bandwidth.
    1. Log in to the management console.
    2. Hover on the upper left corner to display Service List and choose Networking > Cloud Connect.
    3. In the navigation pane on the left, choose Cloud Connect > Cloud Connections.
    4. In the cloud connection list, locate the cloud connection and click its name.
    5. Click Inter-Region Bandwidths.
    6. Click Assign Inter-Region Bandwidth and configure the parameters based on Table 5.
      Table 5 Parameters required for assigning inter-region bandwidth

      Parameter

      Description

      Regions

      Specifies the two regions between which network communications are required.

      Bandwidth Package

      Specifies the bandwidth package you want to bind to the cloud connection.

      Bandwidth

      Specifies the bandwidth you require for communications between regions, in Mbit/s.

      The sum of all inter-region bandwidths you assign cannot exceed the total bandwidth of the bandwidth package. Plan the bandwidth in advance.

    7. Click OK.

      Now the VPCs in two regions can communicate with each other.

  5. View the routes and verify the configuration.