All Products
Search
Document Center

:What do I do if the CIDR blocks of vSwitches overlap with each other?

Last Updated:Jun 14, 2023

Issue

If multiple virtual private clouds (VPCs) are attached to the same Cloud Enterprise Network (CEN) instance, and the CIDR blocks of the VPCs overlap with each other, the Elastic Compute Service (ECS) instances in the VPCs cannot communicate with each other through CEN.

Solutions

Use the following solutions to address this issue:

  • Use a NAT gateway. For more information, see Allow VPCs with overlapping CIDR blocks to access each other by using NAT gateways.

  • Perform the following operations to delete vSwitches with overlapping CIDR blocks:

    1. Find the vSwitch to which the overlapping CIDR block belongs.

      1. Log on to the CEN console.

      2. On the Instances page, click the CEN instance that you want to manage.

      3. Navigate to the Basic Information > Transit Router tab, and click the ID of the transit router on which the VPC connection is created.

      4. On the details page of the transit router, click the Network Instance Route Table tab and view the overlapping CIDR block.

      5. Log on to the VPC console, click the VPC, and then find the vSwitch to which the overlapping CIDR block belongs.

    2. Create a new vSwitch in the VPC.

      • The new vSwitch and the vSwitch that you want to delete must be in the same zone, and the CIDR block of the vSwitch cannot overlap with the CIDR blocks of the CEN instance. For more information, see Create and manage a vSwitch.

        Note

        Avoid overlapping CIDR blocks when you design your network topology. For more information, see Plan networks.

      • Configure the same configuration as the vSwitch to be deleted for the new vSwitch.

        If the vSwitch to be deleted is associated with a custom route table, associate the new vSwitch with the same custom route table.

    3. Migrate the ECS instances and database instances from the vSwitch to be deleted to the new vSwitch.

    4. Delete the vSwitch with an overlapping CIDR block.

      Before you delete a vSwitch, make sure that the following requirements are met:

      • All the resources deployed in the vSwitch are deleted. For example, delete the following types of resource from the vSwitch: ECS, Classic Load Balancer (CLB), ApsaraDB RDS, ApsaraDB for MongoDB, PolarDB, Elasticsearch, Time Series Database (TSDB), ApsaraDB for HBase, ApsaraDB for ClickHouse, Tablestore, Container Registry, Elastic High Performance Computing (E-HPC), Data Lake Analytics (DLA), Database Backup (DBS), and Apsara File Storage NAS (NAS). For more information, see the relevant documentation.

      • If the vSwitch that you want to delete is associated with SNAT entries, high-availability virtual IP addresses (HAVIPs), custom route tables, or network ACLs, disassociate the vSwitch from them. For more information, see VPC documentation.

Applicable scope

  • CEN