Connecting a Cluster to the Peer VPC Through an Enterprise Router
Application Scenarios
An enterprise router connects virtual private clouds (VPCs) and on-premises networks to build a central hub network and implement communication between VPCs in the same region. It has high specifications, provides high bandwidth, and delivers high performance. With the enterprise routers, CCE clusters in different VPCs can access each other.
Clusters in different VPCs cannot communicate with VMs in the peer VPCs within a short period of time after containers are created in the clusters. To solve this problem, attach the peer VPCs to the enterprise routers. In a CCE Turbo cluster, configure parameters to delay the pod startup to solve this problem. For details, see Configuring Parameters to Delay the Pod Startup in a CCE Turbo Cluster.
Network Planning
Before attaching VPCs to the enterprise routers, determine the VPC CIDR blocks and the enterprise routers' route table. Ensure that the following requirements are met.
Resource |
Description |
---|---|
VPC |
|
Enterprise router |
After Default Route Table Association and Default Route Table Propagation are enabled and a VPC attachment is created, the system automatically:
|
For details, see Step 1: Plan Networks and Resources.
Creating an Enterprise Router
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- Choose Service List > Networking > Enterprise Router.
- Enter the Enterprise Router page.
- Click Create Enterprise Router in the upper right corner.
- Enter the Create Enterprise Router page.
- Configure basic information following instructions. For details about the parameter settings, see Table 1.
Figure 1 Creating an enterprise router
Table 1 Parameters for creating an enterprise router Parameter
Setting
Example Value
Region
Select the region nearest to your target users. Once the enterprise router is created, the region cannot be changed.
CN-Hong Kong
AZ
Select two AZs to deploy your enterprise router. You can change them after the enterprise router is created.
AZ1
AZ2
Name
Specify the enterprise router name. You can change it after the enterprise router is created.
er-test-01
ASN
Enter an ASN based on your network plan. It cannot be changed after the enterprise router is created.
64512
Default Route Table Association
If you select this option, you do not need to create route tables or associations. You can change your option after the enterprise router is created.
Enable
Default Route Table Propagation
If you select this option, you do not need to create route tables, propagations, or routes. You can change your option after the enterprise router is created.
Enable
Auto Accept Shared Attachments
If you do not select this option, you must accept the requests for creating attachments to this enterprise router from other users with whom this enterprise router is shared.
Disable
Enterprise Project
Select an enterprise project for the enterprise router. You can change it after the enterprise router is created.
default
Tag
Add tags to help you identify your enterprise router. You can change them after the enterprise router is created.
Tag key: test
Tag value: 01
Description
Provide supplementary information about the enterprise router. You can change it after the enterprise router is created.
-
- Click Create Now.
- Check the information on the page displayed and click Submit. Back to the enterprise router list.
- View the enterprise router's status. If its status changes from Creating to Normal, the enterprise router is created.
Figure 2 Enterprise router created
Creating a VPC Attachment to an Enterprise Router
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- Choose Service List > Networking > Enterprise Router. Enter the Enterprise Router page.
- Search for the target enterprise router by name.
- Perform either of the following operations to go to the Attachments tab:
- Locate the pane containing the target enterprise router and click Manage Attachment.
- Click the name of the enterprise router and click the Attachments tab. For details, see Adding VPC Attachments to an Enterprise Router.
- Click Create Attachment. The Create Attachment page is displayed.
- Configure the parameters as prompted. For details, see Table 2.
Figure 3 Creating an attachment
Table 2 Parameter description Parameter
Setting
Example Value
Name
Specify the name of the VPC attachment. You can change it after the attachment is created.
er-attach-01
Attachment Type
Select VPC. The type cannot be changed after the attachment is created.
VPC
Attached Resource
- Select the VPC to be attached to the enterprise router from the drop-down list. The VPC cannot be changed after the attachment is created.
- Select the subnet to be attached to the enterprise router from the drop-down list. The subnet cannot be changed after the attachment is created.
- VPC: vpc-demo-01
- Subnet: subnet-demo-01
Auto Add Routes
- If you enable Auto Add Routes when creating a VPC attachment, you do not need to manually add static routes to the VPC route table. Instead, the system 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.
- If an existing route in the VPC route tables has a destination to 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16, the routes will fail to be added. In this case, do not enable Auto Add Routes. After the attachment is created, manually add routes.
- Do not set the destination of a route (with an enterprise router as the next hop) to 0.0.0.0/0 in the VPC route table. If an ECS in the VPC has an EIP bound, the VPC route table will have a policy-based route with 0.0.0.0/0 as the destination, which has a higher priority than the route with the enterprise router as the next hop. In this case, traffic is forwarded to the EIP and cannot reach the enterprise router.
Enable
Description
Provide supplementary description about the attachment. You can change it after the attachment is created.
-
Tag
Add tags to help you identify your attachment. You can change them after the attachment is created.
Tag key: test
Tag value: 01
- Click Create Now. If the status changes from Creating to Normal, the attachment is created. Repeat steps 6 to 7 to attach other VPCs.
Figure 4 Attaching a VPC to the enterprise router
Verifying the Network
- Log in to the CCE console and search for the CCE cluster that has been attached to the VPC.
- Click the name of the target cluster. In the navigation pane, choose Nodes to view the IP address of the node.
Figure 5 Viewing the IP address of the node on the CCE console
- Log in to the node. For details, see Logging In to a Node. In this example, use VNC provided on the management console to log in to the ECS.
- Run the following command on the ECS console:
ping {ECS address}
Take the cluster in vpc-ER-demo2 as an example. Log in to the er-demo2-04260 node and access the er-demo1-61379 node in the cluster in vpc-ER-demo1. The IP address of the node is 192.168.0.131.
ping 192.168.0.131
If the following information is displayed, the network is accessible.
Figure 6 Viewing the command output
- Repeat the preceding steps to verify the communication between nodes.
If a node using the peer VPC cannot be pinged, check:
- Whether the security group rules of the node allow the ICMP protocol.
- Whether a CIDR block conflict occurs in the VPC route table. Note that the container CIDR blocks cannot conflict with the default CIDR blocks of the enterprise routers. For details, see Network Planning.
Figure 7 Viewing the VPC route table
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