Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Enterprise Router/ Best Practices/ Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Virtual Gateway)/ Procedure for Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Virtual Gateway)

Procedure for Setting Up a Hybrid Cloud Network Using Enterprise Router and a Pair of Direct Connect Connections (Virtual Gateway)

Updated on 2025-01-26 GMT+08:00

Step 1: Create Cloud Resources

Create an enterprise router, a service VPC, and an ECS, as described in Table 5.

  1. Create an enterprise router.

    For details, see Creating an Enterprise Router.

  2. Create a service VPC.

    For details, see Creating a VPC.

  3. Create an ECS in the VPC.

    In this example, the ECS is used to verify the communications between the VPC and the on-premises data center. The ECS quantity and configuration are for reference only.

    For details, see Purchasing a Custom ECS.

Step 2: Add a VPC Attachment for the Enterprise Router

  1. Attach the service VPC to the enterprise router.

    When creating the VPC attachment, enable Auto Add Routes.

    NOTICE:

    If this option is enabled, Enterprise Router automatically adds routes (with this enterprise router as the next hop and 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 as the destinations) to all route tables of the VPC.

    For details, see Creating VPC Attachments for the Enterprise Router.

  2. In the enterprise router route table, check the routes with the destination set to the VPC CIDR block.

    In this example, Default Route Table Association and Default Route Table Propagation are enabled for the enterprise router, and routes with destinations set to VPC CIDR blocks are automatically added when you attach the VPCs to the enterprise router.

    For enterprise router route details, see Table 2 and Table 4.

    In this example, the route whose destination is 192.168.0.0/16 and next hop is the VPC-A attachment is automatically added.

    To view enterprise routes, see Viewing Routes.

  3. In the route table of the service VPC, add a route with the next hop set to the enterprise router.

    For VPC route details, see Table 3.

    In this example, the route destination is 172.16.1.0/24, which is the CIDR block used in the on-premises data center.

    For details, see Adding Routes to VPC Route Tables.

Step 3: Create Virtual Gateway Attachments to the Enterprise Router

For details about Direct Connect resources, see Table 5.

  1. Use one Direct Connect connection to link the on-premises data center to the cloud.

    1. Create a connection.

      For details, see Creating a Connection.

    2. Create a virtual gateway and attach it to the enterprise router.
      1. On the Direct Connect console, create a virtual gateway.

        For details, see Step 2: Create a Virtual Gateway.

      2. On the Enterprise Router console, view the virtual gateway attachment created for the enterprise router.

        For details, see Viewing Details About an Attachment.

        If the status of the virtual gateway attachment is Normal, the attachment has been added.

        Default Route Table Association and Default Route Table Propagation are enabled when you create the enterprise router. After the virtual gateway is attached to the enterprise router, Enterprise Router will automatically:
        • Associate the virtual gateway attachment with the default route table of the enterprise router.
        • Propagate the virtual gateway attachment to the default route table of the enterprise router. The routes to the on-premises data center are propagated to the route table.

          You can view routes to the on-premises data center in the route table of the enterprise router only after taking the following steps.

    3. Create a virtual interface.

      Create a virtual interface to connect the virtual gateway with the on-premises data center. For details, see Step 3: Create a Virtual Interface.

    4. Configure routes on the on-premises network device to point to the cloud.

      The following uses a Huawei network device as an example to describe how to configure a BGP route.

      bgp 64555

      peer 10.0.0.1 as-number 64512

      peer 10.0.0.1 password simple Qaz12345678

      network 172.16.1.0 255.255.255.0

      Table 1 BGP route

      Command

      Description

      bgp 64555

      Enables BGP.

      64555 is the ASN used by the on-premises data center.

      peer 10.0.0.1 as-number 64512

      Creates a BGP peer.
      • 10.0.0.1 is the gateway on Huawei Cloud.
      • 64512 is the ASN used by the cloud.

      peer 10.0.0.1 password simple Qaz12345678

      Performs MD5 authentication on BGP messages when a TCP connection is established between BGP peers.

      Qaz12345678 is the BGP MD5 authentication password.

      network 172.16.1.0 255.255.255.0

      Adds routes in the IP route table to the BGP route table.

      • 172.16.1.0 is the network used by the on-premises data center.
      • 255.255.255.0 is the subnet mask of the on-premises network.
    5. Log in to the ECS (ECS-A).

      Multiple methods are available for logging in to an ECS. For details, see Logging In to an ECS.

      In this example, use VNC provided on the management console to log in to the ECS.

    6. Run the following command to verify the connectivity over the Direct Connect connection:

      ping IP address used in the on-premises data center

      Example command:

      ping 172.16.1.10

      If information similar to the following is displayed, VPC-A can communicate with the on-premises data center over the Direct Connect connection:
      [root@ecs-A ~]# ping 172.16.1.10
      PING 172.16.1.10 (172.16.1.10) 56(84) bytes of data.
      64 bytes from 172.16.1.10: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 172.16.1.10: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 172.16.1.10: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 172.16.1.10: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 172.16.1.10 ping statistics ---

  2. Use the other Direct Connect connection to link the on-premises data center to the cloud.

    1. Repeat 1.a to 1.d to create the other Direct Connect connection.
    2. Simulate a fault on one Direct Connect connection to disconnect communications between the service VPC and the on-premises data center over this connection.
      NOTICE:

      To prevent service interruptions, simulate the fault only when no packets are transmitted over this connection.

    3. Repeat 1.e to 1.f to verify the connectivity over the other Direct Connect connection.

Step 4: Configure Equal-Cost Routes on the Enterprise Router and on the On-Premises Network

  1. In the enterprise router route table, check whether load balancing is implemented among the BGP routes learned by the enterprise router through the virtual gateway attachments.

    To view enterprise routes, see Viewing Routes.

    • If load balancing is implemented, no route policy is required.
    • If load balancing is not implemented, configure a route policy and perform 2 to configure equal-cost routes on the enterprise router.

      If the next hops of the routes to 172.16.1.0/24 are two virtual gateways, the two Direct Connect connections are working in load balancing mode.

  2. (Optional) Configure equal-cost routes on the enterprise router.

    1. Create a route policy that contains two nodes.

      For details about the policy, see Table 5.

      For details about how to create a route policy, see Creating a Route Policy.

    2. Associate the route policy with the propagation of each virtual gateway attachment to enable the BGP routes learned by the enterprise router through the virtual gateway attachments to work as equal-cost routes.

      For details, see Associating a Route Policy with the Propagation of an Attachment.

    3. Repeat 1 to verify that load balancing is implemented.
    NOTICE:

    Replace the original policy values for the AS_Path of the routes may cause network loops. Before configuring a route policy, check your network plan.

  3. Log in to the on-premises network device and configure the routes from the on-premises data center to the enterprise router as equal-cost routes based on your network plan for load balancing.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback