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/ Enabling an On-Premises Data Center to Access Service VPCs Using an Enterprise Router and Transit VPC/ Procedure for Enabling an On-Premises Data Center to Access Service VPCs Using Enterprise Router and Transit VPC

Procedure for Enabling an On-Premises Data Center to Access Service VPCs Using Enterprise Router and Transit VPC

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

Step 1: Create Cloud Resources

Create an enterprise router, two service VPCs, a transit VPC, and two ECSs, as described in Table 5.

  1. Create an enterprise router.

    Disable Default Route Table Propagation when you create the enterprise router. For details, see Table 9.

    For details, see Creating an Enterprise Router.

  2. Create two service VPCs and a transit VPC.

    For details, see Creating a VPC.

  3. Create two ECSs.

    In this example, the ECSs are used to verify network communications. The quantity and configuration are for reference only.

    For details, see Purchasing a Custom ECS.

Step 2: Create VPC Peering Connections and Configure Routes

  1. Create a VPC peering connection between each service VPC and the transit VPC.

    1. Create VPC peering connection Peer-A-T to connect VPC-A and VPC-Transit.
    2. Create VPC peering connection Peer-B-T to connect VPC-B and VPC-Transit.

    For details about the VPC peering connections, see Table 7.

  2. In the route tables of VPC-A, VPC-B, and VPC-Transit, add routes with the next hop being the corresponding VPC peering connection.

    For details, see Adding Routes to VPC Route Tables.

    In this example, add the routes in Table 3, and the next hop is the corresponding VPC peering connection.

    • Add two routes in the route table of VPC-A with destination set to 172.17.0.0/16 and 10.10.0.0/16.
    • Add two routes in the route table of VPC-B with destination set to 172.16.0.0/16 and 10.10.0.0/16.
    • Add two routes to the route table of VPC-Transit with destination set to 172.17.0.0/16 and 172.16.0.0/16.

  3. Verify network connectivity between VPC-A and VPC-B.

    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 ECSs.
    1. Log in to ECS-A and verify that VPC-A and VPC-B can communicate with each other over the VPC peering connections.

      ping Private IP address of ECS-B

      Example command:

      ping 172.17.1.113

      If information similar to the following is displayed, the communications between VPC-A and VPC-B are normal:
      [root@ECS-A ~]# ping 172.17.1.113
      PING 172.17.1.113 (172.17.1.113) 56(84) bytes of data.
      64 bytes from 172.17.1.113: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 172.17.1.113: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 172.17.1.113: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 172.17.1.113: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 172.17.1.113 ping statistics ---
    2. Log in to ECS-B and verify that VPC-B can communicate with VPC-A over the VPC peering connections.

      ping Private IP address of ECS-A

      Example command:

      ping 172.16.1.25

      If information similar to the following is displayed, the communications between VPC-B and VPC-A are normal:
      [root@ECS-B ~]# ping 172.16.1.25
      PING 172.16.1.25 (172.16.1.25) 56(84) bytes of data.
      64 bytes from 172.16.1.25: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 172.16.1.25: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 172.16.1.25: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 172.16.1.25: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 172.16.1.25 ping statistics ---

Step 3: Create a VPC Attachment to the Enterprise Router

  1. Attach the transit VPC to the enterprise router.

    Do not enable Auto Add Routes when creating the attachment. For more resource details, see Table 9.

    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. In this example, the CIDR block of each service VPC needs to be added as the route destination.

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

  2. In the route table of the transit VPC, add a route with the next hop as the enterprise router.

    For details, see Adding Routes to VPC Route Tables.

    In this example, add a route in the route table of VPC-Transit, with the next hop as the enterprise router and destination as 10.10.0.0/16.

  3. In the route table of the enterprise router, add static routes with the next hop as the VPC attachment.

    For details, see Creating a Static Route.

    In this example, add routes in the route table of the enterprise router, with the next hop as the VPC-Transit attachment. The destination of one route is 172.16.0.0/16, and that of the other is 172.17.0.0/16. For details, see Table 4.

Step 4: Create a Virtual Gateway Attachment to the Enterprise Router

For details about Direct Connect resources, see Table 8.

  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, check whether the virtual gateway attachment has been added to 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.

      In this example, Default Route Table Association was enabled but Default Route Table Propagation was disabled during the creation of the enterprise router. After the virtual gateway attachment is added:
      • An association is automatically created in the default route table of the enterprise router.
      • You need to manually create a propagation to proceed to 3.

  3. In the route table of the enterprise router, create a propagation for the virtual gateway attachment to automatically learn the routes of the on-premises data center.

    For details about creating a propagation, see Creating a Propagation.

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

  4. 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.

  5. Configure routes on the network device in the on-premises data center.

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

    bgp 65525

    peer 10.0.0.1 as-number 64512

    peer 10.0.0.1 password simple Qaz12345678

    network 10.10.0.0 255.255.0.0

    Table 1 BGP route

    Command

    Description

    bgp 65525

    Enables BGP.

    65525 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 Huawei Cloud. The value must be 64512.

    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 10.10.0.0 255.255.0.0

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

    • 10.10.0.0 is the network used by the on-premises data center.
    • 255.255.0.0 is the subnet mask of the on-premises network.

Step 5: Verify Network Connectivity Between the Service VPCs and On-Premises Data Center

  1. Log in to the ECSs and verify the communications between each service VPC and the on-premises data center.

    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 ECSs.

    1. Log in to ECS-A and run the following command to check whether VPC-A can communicate with the on-premises data center through the enterprise router:

      ping IP address used in the on-premises data center

      Example command:

      ping 10.10.0.27

      If information similar to the following is displayed, VPC-A can communicate with the on-premises data center through the enterprise router.
      [root@ECS-A ~]# ping 10.10.0.27
      PING 10.10.0.27 (10.10.0.27) 56(84) bytes of data.
      64 bytes from 10.10.0.27: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 10.10.0.27: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 10.10.0.27: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 10.10.0.27: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 10.10.0.27 ping statistics ---
    2. Log in to ECS-B and run the following command to check whether VPC-B can communicate with the on-premises data center through the enterprise router:

      ping IP address used in the on-premises data center

      Example command:

      ping 10.10.0.30

      If information similar to the following is displayed, VPC-B can communicate with the on-premises data center through the enterprise router.
      [root@ECS-B ~]# ping 10.10.0.30
      PING 10.10.0.30 (10.10.0.30) 56(84) bytes of data.
      64 bytes from 10.10.0.30: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 10.10.0.30: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 10.10.0.30: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 10.10.0.30: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 10.10.0.30 ping statistics ---

  2. Log in to the ECSs and verify the communications between service VPCs.

    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 ECSs.
    1. Log in to ECS-A and verify that VPC-A and VPC-B can communicate with each other over the VPC peering connections.

      ping Private IP address of ECS-B

      Example command:

      ping 172.17.1.113

      If information similar to the following is displayed, the communications between VPC-A and VPC-B are normal:
      [root@ECS-A ~]# ping 172.17.1.113
      PING 172.17.1.113 (172.17.1.113) 56(84) bytes of data.
      64 bytes from 172.17.1.113: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 172.17.1.113: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 172.17.1.113: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 172.17.1.113: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 172.17.1.113 ping statistics ---
    2. Log in to ECS-B and verify that VPC-B can communicate with VPC-A over the VPC peering connections.

      ping Private IP address of ECS-A

      Example command:

      ping 172.16.1.25

      If information similar to the following is displayed, the communications between VPC-B and VPC-A are normal:
      [root@ECS-B ~]# ping 172.16.1.25
      PING 172.16.1.25 (172.16.1.25) 56(84) bytes of data.
      64 bytes from 172.16.1.25: icmp_seq=1 ttl=64 time=0.849 ms
      64 bytes from 172.16.1.25: icmp_seq=2 ttl=64 time=0.455 ms
      64 bytes from 172.16.1.25: icmp_seq=3 ttl=64 time=0.385 ms
      64 bytes from 172.16.1.25: icmp_seq=4 ttl=64 time=0.372 ms
      ...
      --- 172.16.1.25 ping statistics ---

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