- What's New
- Function Overview
- Product Bulletin
- Service Overview
- Billing
- Getting Started
- User Guide
-
Best Practices
- Direct Connect Best Practices
- Connecting an On-Premises Data Center to a VPC over a Single Connection and Using Static Routing to Route Traffic
- Connecting an On-Premises Data Center to a VPC over a Single Connection and Using BGP Routing to Route Traffic
- Connecting an On-Premises Data Center to a VPC over Two Connections in Load Balancing Mode (Virtual Gateway)
- Connecting an On-Premises Data Center to a VPC over Two Connections in an Active/Standby Pair (Virtual Gateway)
- Connecting an On-Premises Data Center to Multiple VPCs that Do Not Need to Communicate with Each Other
- Connecting an On-Premises Data Center to Multiple VPCs in the Same Region Using Direct Connect and VPC Peering
- Using a Public NAT Gateway and Direct Connect to Accelerate Internet Access
- Allowing On-Premises Servers to Access Cloud Services Using Direct Connect and VPC Endpoint
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- API Usage
-
API
- Connections
- Virtual Gateways
-
Virtual Interfaces
- Creating a Virtual Interface
- Querying the Virtual Interface List
- Querying Details About a Virtual Interface
- Updating a Virtual Interface
- Deleting a Virtual Interface
- Creating a Virtual Interface Peer
- Updating a Virtual Interface Peer
- Deleting a Virtual Interface Peer
- Performing a Virtual Interface Switchover Test
- Querying the List of Virtual Interface Switchover Test Records
- Tag Management
- Quota Management
- Global DC Gateways
- Peer Links
- Connect Gateways
- Global EIPs
- Global DC Gateway Route Tables
- Public Parameters
- Appendix
- SDK Reference
- Troubleshooting
-
FAQs
-
Popular Questions
- What Are the Network Requirements for Connections?
- What Locations Are Available for Direct Connect?
- How Do I Select a Carrier When Purchasing a Connection?
- How Will I Be Billed for Direct Connect?
- How Do I Submit a Service Ticket?
- How Do I Test the Network Connectivity Between a Location and the Cloud?
- What Do I Do If I Select the Wrong Carrier When Creating a Connection?
-
Product Consultation
- What Are the Network Requirements for Connections?
- What Are 1GE and 10GE?
- What Locations Are Available for Direct Connect?
- Is BGP Routing Supported in Direct Connect?
- What Is Full-Service Installation Statement?
- How Do I Submit a Service Ticket?
- What Are the Network Latency and Packet Loss Rate of a Connection?
- Are the Uplink and Downlink Bandwidths of a Direct Connect Connection the Same?
- What Do I Do If I Select the Wrong Carrier When Creating a Connection?
- How Do I Plan the VPCs for a New Connection?
- What Are Local and Remote Gateways (Interconnection IP Addresses)?
- How Do I Configure BFD for a Connection?
- Leased Line
-
Interconnection with the Cloud
- Can I Access the Same VPC over Multiple Connections?
- How Do I Plan the CIDR Blocks for a Connection?
- What Should I Consider When I Use Direct Connect to Access the Cloud?
- Does Direct Connect Support NAT?
- Can the VLAN of the On-premises Network Be Used in the VPC Through Direct Connect?
- Can My On-Premises Data Center Access Multiple VPCs Through One Connection?
- Can Direct Connect Be Used with Similar Services of Other Cloud Service Providers?
-
Networking and Scenarios
- Can Multiple Connections Access the Same VPC?
- Can My On-Premises Data Center Access Multiple VPCs Through One Connection?
- Can Direct Connect Be Used with Similar Services of Other Cloud Service Providers?
- Can I Limit the Bandwidth Available on Each Hosted Connection?
- How Do I Plan the VPCs for a New Connection?
-
Related Console Operations
- How Do I Submit a Service Ticket?
- How Can I Unsubscribe from Direct Connect?
- What Parameters Can Be Modified After I Have Created a Virtual Interface?
- Do I Need to Delete the Virtual Gateway and Virtual Interface Before Deleting a Hosted Connection?
- How Do I Change the Routing Mode of a Connection?
- How Do I Delete a Hosted Connection?
- What Is the BGP ASN Used by Huawei Cloud?
- What Are Local and Remote Gateways (Interconnection IP Addresses)?
- Troubleshooting
- Billing
- Resource Monitoring
- Quota
-
Popular Questions
-
More Documents
- User Guide (ME-Abu Dhabi Region)
- User Guide (Paris Region)
- eu-west-0-api
- User Guide (Kuala Lumpur Region)
-
API Reference (Kuala Lumpur Region)
- Before You Start
- API Overview
- Calling APIs
- API Usage
-
API
- Connection
- Virtual Gateway
-
Virtual Interface
- Querying Details About a Virtual Interface
- Updating a Virtual Interface
- Deleting a Virtual Interface
- Querying the Virtual Interface List
- Creating a Virtual Interface
- Updating a Virtual Interface Peer
- Deleting a Virtual Interface Peer
- Creating a Virtual Interface Peer
- Performing a Virtual Interface Switchover Test
- Querying the Switchover Test Records of a Virtual Interface
- Tag management
- Quota Management
- Public Parameters
- Appendixes
- Change History
- General Reference
Show all
Copied.
Connecting an On-Premises Data Center to Multiple VPCs in the Same Region Using Direct Connect and VPC Peering
Scenario
The CIDR block of each VPC must be unique.
Typical Topology
Procedure
- Configure Direct Connect to connect your on-premises data center to VPC A.
- Create a connection.
- Create a virtual gateway.
When creating the virtual gateway, select VPC A and add the CIDR block of VPC B to the local subnet.
- Create a virtual interface.
- Create a VPC peering connection between VPC A and VPC B.
- Log in to the management console.
- On the console homepage, click in the upper left corner and select the desired region and project.
- Click to display Service List and choose Networking > Virtual Private Cloud.
- In the navigation pane on the left, click VPC Peering Connections.
- Click Create VPC Peering Connection.
- Configure the parameters based on Table 1.
Figure 1 Creating a VPC peering connection
Table 1 Parameters required for creating a VPC peering connection Parameter
Example Value
Description
Name
peering-001
Specifies the name of the VPC peering connection.
The name contains a maximum of 64 characters, which consist of letters, digits, hyphens (-), and underscores (_).
Local VPC
VPC B
Specifies the local VPC. Select VPC B from the drop-down list.
Local VPC CIDR Block
192.168.2.0/24
Specifies the CIDR block of the local VPC.
Account
My account
Specifies whether the VPC to peer with is from your account or another user's account.
- My account: The VPC peering connection will connect two VPCs in your account.
- Another account: The VPC peering connection will connect your VPC to another VPC in another account.
Peer Project
aaa
Specifies the project name. The name of the current project is used by default.
You can log in to the management console, hover the cursor over account name in the upper right corner, and choose My Credentials. On the My Credentials page, view the project name and project ID.
Peer VPC
VPC A
Specifies the peer VPC. Select VPC A from the drop-down list.
Peer VPC CIDR Block
192.168.10.0/24
Specifies the CIDR block of the peer VPC.
The local and peer VPCs cannot have matching or overlapping CIDR blocks. Otherwise, the routes added for the VPC peering connection may not take effect.
Description
-
Provides supplementary information about the VPC peering connection.
- Click OK.
- Add routes for the VPC peering connection.
- Under Networking, click Virtual Private Cloud.
- In the navigation pane on the left, click VPC Peering Connections.
- Locate the VPC peering connection in the connection list.
- Click the name of the VPC peering connection to switch to the page showing details about the connection.
- Click the Local Routes tab.
- On the Local Routes tab page of the VPC peering connection, click here as prompted.
The Summary tab of the default route table for the local VPC is displayed.
Table 2 lists the parameters.
- Click Add Route.
Table 2 Parameters required for adding a route for a VPC peering connection Parameter
Description
Destination Type
Specifies the public IP address.
Destination
Specifies the CIDR block of the peer VPC, a subnet, or the private IP address of an ECS in the peer VPC.
For details, see VPC Peering Connection Examples.
Next Hop Type
Specifies the next hop type. Select VPC peering connection.
Next Hop
Specifies the next hop address. Select the created VPC peering connection.
Description
(Optional) Provides supplementary information about the route.
Enter up to 255 characters. Angle brackets (< or >) are not allowed.
- Click OK.
You can view the route in the route list.
- Click the Peer Routes tab.
- On the Peer Routes tab page of the VPC peering connection, click here as prompted.
The Summary tab of the default route table for the peer VPC is displayed.
Table 2 lists the parameters.
Table 3 Parameters required for adding a route for a VPC peering connection Parameter
Description
Destination Type
Specifies the public IP address.
Destination
Specifies the CIDR block of the local VPC, a subnet CIDR block, or the private IP address of an ECS in the local VPC.
For details, see VPC Peering Connection Examples.
Next Hop Type
Specifies the next hop type. Select VPC peering connection.
Next Hop
Specifies the next hop address. Select the created VPC peering connection.
Description
(Optional) Provides supplementary information about the route.
Enter up to 255 characters. Angle brackets (< or >) are not allowed.
- Click OK.
You can view the route in the route list.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot