Help Center> Cloud Connect> Best Practices> Connecting Multiple On-Premises Data Centers to Multiple VPCs in Different Regions
Updated on 2022-08-15 GMT+08:00

Connecting Multiple On-Premises Data Centers to Multiple VPCs in Different Regions

Scenarios

If you have more than one on-premises data center and more than one VPC, you can use Direct Connect and Cloud Connect to connect all your on-premises data centers to the VPCs in different regions.

Figure 1 shows the networking topology.

Figure 1 Networking topology

When you configure Cloud Connect, note that:

  • Subnet CIDR blocks of the VPCs cannot overlap or conflict with each other.
  • The routes for the subnets in the VPCs cannot conflict with existing routes, including those added for VPC Peering, Direct Connect, or VPN.

Prerequisites

  • You have a Huawei Cloud account, and the Huawei Cloud account has been configured with operation permissions of related services.
  • The account balance is sufficient to purchase the required resources, including Direct Connect connections, bandwidth packages, and ECSs.
  • Direct Connect locations have been determined and the site survey of on-premises data centers have been completed together with the carrier. For details, see Preparations.
  • The VPCs and subnets that need to communicate with each other across regions have been created.
  • All VPC subnets have been configured for your on-premises data centers.

Procedure

  1. Configure Direct Connect. In this example, two Direct Connect connections are required to connect each on-premises data center to the cloud.

    1. Create a Direct Connect connection.
      1. Log in to the Direct Connect console.
      2. On the console homepage, click in the upper left corner and select the desired region and project.
      3. Hover on to display Service List and choose Networking > Direct Connect.
      4. In the navigation pane on the left, choose Direct Connect > Connections.
      5. Click Create Connection.
      6. On the Create Connection page, configure the parameters based on Table 1.
        Table 1 Parameters required for creating a cloud connection

        Parameter

        Description

        Region

        Specifies the region where the connection is deployed. You can change the region here, or use the region selector in the upper left corner of the console.

        Connection Name

        Specifies the connection name. Enter a desired name.

        Location

        Specifies the location where your leased line can connect to Huawei Cloud.

        Carrier

        Specifies the carrier that provides the leased line.

        Port Type

        Specifies the type of the port used by the connection. There are four types of ports: 1GE, 10GE, 40GE, and 100GE.

        Leased Line Bandwidth

        Specifies the bandwidth of the connection, in Mbit/s. Select a value from the drop-down list. This is the bandwidth of the leased line you have purchased from the carrier.

        Your Equipment Room Address

        Specifies the address of your equipment room. The address must be specific to the floor on which your equipment room is located, for example, Equipment Room XX, Building XX, No. XX, Huajing Road, Fengdong District, Shanghai.

        Tag

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

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

        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.

        Description

        Provides supplementary information about the connection.

        Billing Mode

        Specifies how you are charged. Currently, only Yearly/Monthly is supported.

        Required Duration

        Specifies the duration for which you require the connection.

        Auto-renew

        Specifies whether to automatically renew the connection to ensure service continuity.

        It is recommended that you set the auto-renewal period to be the same as the required duration. If the required duration is three months, the system automatically renews the subscription for every three months.

        Enterprise Project

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

        Contact Person/Phone Number/Contact Email

        Specifies information about the person who is responsible for your connection.

        If you do not provide the contact information, your account information will be used. This will prolong the review.

        Table 2 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.
      7. Click Next
      8. Confirm the order and click Pay.
      9. Click Pay.
    2. Connect your data center to the location you select.
      1. After the payment is complete, switch back to the connection list. Locate the newly created connection, click Apply for LOA in the Operation column, and then enter information about the construction plan and equipment room LOA.
      2. Click Confirm to submit the LOA application, and wait for the approval.
      3. After the LOA is approved, request the carrier to complete the construction. Click Download LOA, save and print the LOA, and contact your carrier. The carrier and construction personnel must carry the LOA when entering the construction site.
      4. Wait until the cabling is complete, obtain the line code and in-building cable label from the carrier and click Report Completion of Construction.
      5. Wait for Huawei Cloud to complete the construction. Huawei Cloud engineers will connect the leased line to the Huawei Cloud gateway port.
      6. Confirm that the construction has been completed and click Confirm Completion in the Operation column.
      7. Click Confirm. The connection status will change to Normal.

      The time required for LOA application, carrier cabling, and Huawei Cloud construction varies, especially during holidays and important events.

    3. Create a virtual gateway.

      Create a virtual gateway to associate it with the VPC in CN South-Guangzhou.

      1. Log in to the management console.
      2. On the console homepage, click in the upper left corner and select the desired region and project.
      3. Hover on to display Service List and choose Networking > Direct Connect.
      4. In the navigation pane on the left, choose Direct Connect > Virtual Gateways.
      5. Click Create Virtual Gateway.
      6. Configure the parameters based on Table 3.
        Figure 2 Create Virtual Gateway
        Table 3 Parameters required for creating a virtual gateway

        Parameter

        Description

        Name

        Specifies the virtual gateway name.

        The name can contain 1 to 64 characters.

        VPC

        Specifies the VPC associated with the virtual gateway.

        Local Subnet

        Specifies the CIDR blocks of subnets in the VPC to connect to the on-premises network.

        Description

        Provides supplementary information about the virtual gateway.

        The description can contain a maximum of 128 characters.

        Add CIDR blocks of all VPC subnets that will communicate with the on-premises data center to ensure normal communications.

      7. Click OK.

        When the virtual gateway status changes Normal, the virtual gateway has been created.

    4. Create a virtual interface.

      Create a virtual interface over which the on-premises data center connects to Huawei Cloud so that the on-premises data center can access the VPC in CN South-Guangzhou.

      1. Log in to the management console.
      2. On the console homepage, click in the upper left corner and select the desired region and project.
      3. Hover on to display Service List and choose Networking > Direct Connect.
      4. In the navigation pane on the left, choose Direct Connect > Virtual Interfaces.
      5. Click Create Virtual Interface.
      6. Configure the parameters based on Table 4.
        Figure 3 Create Virtual Interface
        Table 4 Parameters required for creating a virtual interface

        Parameter

        Description

        Region

        Specifies the region where the connection is deployed. You can change the region here, or use the region selector in the upper left corner of the console.

        Name

        Specifies the virtual interface name.

        The name can contain 1 to 64 characters.

        Connection

        Specifies the connection you use to connect your data center to the cloud.

        Virtual Gateway

        Specifies the virtual gateway to which the virtual interface will connect.

        VLAN

        Specifies the VLAN of the virtual interface.

        You need to configure the VLAN if you buy a self-service connection.

        The VLAN for a hosted connection will be allocated by the carrier or partner. In this scenario, you do not need to configure the VLAN.

        Enterprise Project

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

        Bandwidth

        Specifies the bandwidth that can be used by the virtual interface, in Mbit/s. The bandwidth cannot exceed that of the connection.

        Local Gateway

        Specifies the IP address for connecting to the cloud.

        Remote Gateway

        Specifies the IP address for connecting to the on-premises network.

        The IP address of the remote gateway must be in the same network segment as that of the local gateway, and it is recommended that both IP addresses use a 30-bit mask.

        Remote Subnet

        Specifies the subnets and masks of the on-premises data center. If there are multiple subnets, use commas (,) to separate them.

        Routing Mode

        Specifies the routing mode. Two options are available, static routing and BGP routing.

        If there are two or more connections, select BGP routing.

        BGP ASN

        Specifies the ASN of the BGP peer. Enter a value from 1 to 65535, excluding 64512, which is reserved by Huawei Cloud.

        This parameter is required if you select BGP routing.

        BGP MD5 Authentication Key

        Specifies the password used to authenticate the BGP peer using MD5.

        This parameter is mandatory if you select BGP routing, and you must ensure that the parameter values on both gateways are the same.

        The value contains 8 to 255 characters and must contain at least two types of the following characters:

        • Uppercase letters
        • Lowercase letters
        • Digits
        • Special characters ~!, .:;-_"(){}[]/@#$ %^&*+\|=

        Description

        Provides supplementary information about the virtual interface.

        The description can contain a maximum of 128 characters.

      7. Click Submit. When the status of the virtual interface changes Normal, the virtual interface has been created.
      8. Ping a server in on-premises data center 1 from an ECS in the VPC in CN South-Guangzhou (VPC 1) to test network connectivity.
    5. Repeat 1.a to 1.d to establish network connectivity between on-premises data center 2 and the VPC in CN East-Shanghai1 (VPC 2).

  2. Configure Cloud Connect to connect the VPCs in CN South-Guangzhou and CN East-Shanghai1.

    1. Create a cloud connection.
      1. Log in to the management console.
      2. Hover on to display Service List and choose Networking > Direct Connect.
        Figure 4 Cloud Connect

      3. In the navigation pane on the left, choose Cloud Connect > Cloud Connections.
      4. On the displayed page, click Create Cloud Connection.

      5. Configure the parameters based on Table 5.
        Table 5 Parameters required for creating a cloud connection

        Parameter

        Description

        Name

        Specifies the cloud connection name.

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

        Enterprise Project

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

        Scenario

        VPC: VPCs or virtual gateways can use this cloud connection.

        Tag

        Identifies the cloud connection. A tag consists of a key and a value. You can add 10 tags to a cloud connection.

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

        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.

        Description

        Provides supplementary information about the cloud connection.

        The description can contain a maximum of 255 characters.

        Table 6 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.
      6. Click OK.
    2. Load network instances.

      Load the VPCs in CN South-Guangzhou and CN East-Shanghai1 to the created cloud connection.

      1. In the cloud connection list, click the cloud connection named CloudConnect.
        On the displayed page, you can view details about the cloud connection, such as its name, ID, status, time when the cloud connection was created, and description. There are also four tabs: Network Instances, Bound Bandwidth Packages, Inter-Region Bandwidths, and Route Information.
        Figure 5 Cloud connection details
      2. Under Network Instances, click Load Network Instance.
        Figure 6 Load Network Instance
      3. Configure the parameters.

        To enable the on-premises data center to access the VPC, you need to add the subnet used in the on-premises data center as a custom CIDR block.

      4. Click OK. The VPC in CN South-Guangzhou has been loaded to the cloud connection.
      5. Repeat the preceding steps to load the VPC in CN East-Shanghai to the cloud connection.
        Figure 7 Loading the other VPC
        After you load the VPCs, the VPCs in the two regions are on the same network. You can view the routes of each VPC on the Route Information tab page.
        Figure 8 Route Information
    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, you need to purchase a bandwidth package and bind it to the cloud connection.

      1. In the cloud connection list, click the cloud connection named CloudConnect.
      2. On the details page of the cloud connection, click Bound Bandwidth Packages and then Buy Bandwidth Package.
        Figure 9 Buy Bandwidth Package
      3. Configure the parameters.

        Because the two VPCs are in the Chinese mainland, select Single Geographic Region for Applicability and Chinese mainland for Geographic Region.

      4. Click Buy Now.
      5. Confirm the information and click Pay Now.
      6. Click Pay.

        Go back to the bandwidth package list, locate the bandwidth package, and verify that its status is Normal.

        In the navigation pane on the left, choose Bandwidth Packages. On the displayed page, locate the bandwidth package you just purchased. You can view its details, including the billing mode, order information, cloud connection to which it is bound, used bandwidth, and remaining bandwidth. You can also modify, unbind, renew, and unsubscribe from the bandwidth package.

    4. Assign an inter-region bandwidth.
      1. In the cloud connection list, click the cloud connection named CloudConnect.
      2. On the details page of the cloud connection, click Inter-Region Bandwidths and then Assign Inter-Region Bandwidth.
        Figure 10 Assign Inter-Region Bandwidth
      3. Configure the parameters.

        Select CN South-Guangzhou and CN East-Shanghai1 for Regions. The system automatically displays the bandwidth package bound to the cloud connection. Set the bandwidth based on your requirements, for example, 1 Mbit/s.

      4. View the assigned bandwidth on the Inter-Region Bandwidths tab page.

        The default security group rule denies all the inbound traffic. Ensure that security group rules in both directions are correctly configured for resources in the regions to ensure normal communications.

  1. Configure local routes on the on-premises data centers.

    • In on-premises data center 1, add routes to the VPC in CN South-Guangzhou (192.168.3.0/24), the VPC in CN East-Shanghai1 (192.168.1.0/24), and on-premises data center 2 (192.168.5.0/24).
    • In on-premises data center 2, add routes to the VPC in CN East-Shanghai1 (192.168.1.0/24), the VPC in CN South-Guangzhou (192.168.3.0/24), and on-premises data center 1 (172.16.1.0/24).

Verification

  1. Ping an ECS in the VPC in CN East-Shanghai1 and a server in each data center from an ECS in the VPC in CN South-Guangzhou.

  2. Ping an ECS in the VPC in CN South-Guangzhou and a server in each data center from an ECS in the VPC in CN East-Shanghai1.

  3. View the routes.