Help Center/Cloud Container Engine/Best Practices/Networking/Connecting a Cluster to the Peer VPC Through an Enterprise Router
Updated on 2026-03-26 GMT+08:00

Connecting a Cluster to the Peer VPC Through an Enterprise Router

Application Scenarios

An enterprise router can connect VPCs or on-premises networks to build a hub-and-spoke architecture, enabling VPC interconnection within the same region. It serves as a large-scale, high-bandwidth, high-performance centralized router in the cloud. With the capabilities of an enterprise router, CCE clusters in different VPCs can communicate with each other.

By connecting the peer VPC through an enterprise router, you can resolve the issue where containers created in clusters across different VPCs cannot communicate with VMs in the peer VPC for a short period after creation. In CCE Turbo clusters, you can also use delayed pod startup to address this issue. For details, see Configuring a Pod Startup Delay in a CCE Turbo Cluster.

Planning the Network

Before attaching VPCs to an enterprise router, determine the VPC CIDR blocks and the enterprise routers' route table. Ensure that the requirements listed in the table below are met.

Resource

Description

VPC

  • The VPC CIDR blocks cannot overlap with each other.
  • The VPC CIDR blocks are propagated to the enterprise router. These CIDR blocks cannot be modified. Overlapping CIDR blocks may cause route conflicts. Additionally, the container CIDR blocks cannot conflict with the node CIDR blocks in the peer VPC. Otherwise, the network is unavailable.
  • If your existing VPCs have overlapping CIDR blocks, manually add static routes to the route tables of the enterprise router. The destination can be the VPC subnet CIDR blocks or smaller ones.

Enterprise router

After Default Route Table Association and Default Route Table Propagation are enabled and a VPC attachment is created, the system automatically:

  • Associates the VPC attachment with the default route table of the enterprise router.
  • Propagates the VPC attachment to the default route table of the enterprise router. The route table automatically learns the VPC CIDR blocks.

For details, see Step 1: Plan Networks and Resources.

Creating an Enterprise Router

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Choose Service List > Networking > Enterprise Router.
  4. Enter the Enterprise Router page.
  5. Click Create Enterprise Router in the upper right corner.
  6. Enter the Create Enterprise Router page.
  7. 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.

    64800

    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.

    -

  8. Click Next.
  9. Check the information on the page displayed and click Submit. Back to the enterprise router list.
  10. View the enterprise router's status. If its status changes from Creating to Normal, the enterprise router has been created.

    Figure 2 Enterprise router created

Creating a VPC Attachment to an Enterprise Router

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Choose Service List > Networking > Enterprise Router.
  4. Search for the enterprise router by name.
  5. Perform either of the following operations to go to the Attachments tab:

  6. Click Create Attachment to go to the corresponding page.
  7. Configure the parameters following instructions. 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

    1. 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.
    2. 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 tables. 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 the VPC route tables already have routes with destinations that conflict with 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, any route pointing to these CIDR blocks 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

  8. Click Create Now. If the status changes from Creating to Normal, the attachment has been created. Repeat 6 to 7 to attach other VPCs.

    Figure 4 Attaching a VPC to the enterprise router

Verifying the Network

  1. Log in to the CCE console and search for the CCE cluster in the VPC.
  2. Click the cluster name to access the cluster console. In the navigation pane, choose Nodes and view the IP address of the node.

    Figure 5 Viewing the IP address of a node on the CCE console

  3. 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.
  4. 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 information similar to the following is displayed, the network is accessible.

    Figure 6 Viewing the command output

  5. Repeat the preceding steps to verify the communication between nodes.

    If a node using the peer VPC cannot be pinged, check:

    1. Whether the security group rules of the node allow the ICMP protocol.
    2. Whether a CIDR block conflict occurs in the VPC route table. Note that the container CIDR block cannot conflict with the default CIDR block of the enterprise router. For details, see Planning the Network.
      Figure 7 Viewing the VPC route table