Help Center> Cloud Connect> Best Practices> Connecting Two VPCs in Different Regions

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 and a way to transmit data between the two VPCs, 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, so that the two branches can communicate with each other over a private network.

Figure 1 Communications between VPCs in different regions

Solution Design

Configuration Procedure

  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, Letter of Authorization for Representative, 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 representative's ID card, of the Cloud Connect Cross-Border Circuit Service Agreement, of the Letter of Authorization for Representative, 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 Connection.
    5. Click Create Cloud Connection. On the displayed page, configure the parameters and click OK.
      Figure 2 Creating a cloud connection

  2. Load network instances.
    1. Locate the cloud connection, in this case, 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 Parameter description

      Parameter

      Description

      Example Value

      Account

      Specifies whether network instances are from the current account or another account.

      Current account

      Region

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

      CN North-Beijing4

      CN-Hong Kong

      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

      VPC

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

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

      CN North Beijing4: VPC-01

      CN-Hong Kong: VPC-e725

      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.

      Subnet:

      CN North-Beijing4: subnet-1 (192.168.1.0/24)

      CN-Hong Kong: subnet-e730 (192.168.0.0/24)

      Other CIDR Block

      CN North-Beijing4: 192.168.44.0/24

      CN-Hong Kong: 192.168.11.0/24

      Figure 3 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 Parameter description

      Parameter

      Description

      Example Value

      Billing Mode

      Specifies how you want the bandwidth package to be billed.

      You can purchase it by year or month as desired.

      Yearly/Monthly

      Name

      Specifies the bandwidth package name.

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

      bandwidthPackge-8047

      Billed By

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

      Bandwidth

      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: The regions you assign inter-region bandwidths to are in the same geographic region.

      Across Geographic Regions: The regions you assign inter-region bandwidths to are in different geographic regions.

      Single Geographic Region

      Geographic Region

      Specifies the geographic region where regions requiring inter-region bandwidths are located.

      Chinese mainland

      Asia-Pacific

      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 bandwidth of the bandwidth package. Assign the bandwidth based on your network plan.

      5

      Required Duration

      Specifies how long you require the bandwidth package for.

      Auto renewal is supported.

      1 month

      Enterprise Project

      Provides a cloud resource management mode, in which cloud resources and members are centrally managed by project.

      default

      Cloud Connection

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

      Two options are available, Bind now and Bind later.

      Bind now

    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 4.
      Table 4 Parameter description

      Parameter

      Description

      Example Value

      Regions

      Specifies the two regions between which network communications are required.

      CN North-Beijing4

      CN-Hong Kong

      Bandwidth Package

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

      bandwidthPackge-8047 (Chinese mainland – Asia Pacific)

      Bandwidth

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

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

      5 Mbit/s

    7. Click OK.

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

  5. View the routes and verify the configuration.