Help Center > > FAQs> Network Configurations> NICs> How Do I Change the CIDR Block of an ECS Subnet?

How Do I Change the CIDR Block of an ECS Subnet?

Updated at: Jun 29, 2021 GMT+08:00

Scenarios

After a subnet is created, its CIDR block cannot be changed.

To change a CIDR block, change the subnet.

Prerequisites

The ECS has been stopped.

Procedure

  1. Log in to the management console.
  2. Under Computing, click Elastic Cloud Server.
  3. In the search box above the ECS list, enter the ECS name, IP address, or ID, and click for search.
  4. Click the name of the ECS whose subnet needs to be modified.

    The page providing details about the ECS is displayed.

  5. Click the NICs tab. Locate the row containing the primary NIC and click Modify Private IP.

    The Modify Private IP dialog box is displayed.

  6. Change the subnet and private IP address of the primary NIC as required.
    • Subnets can be changed only within the same VPC.
    • If the target private IP address is not specified, the system will automatically assign one to the primary NIC.

    For example, the original subnet is subnet-demo (192.168.0.0/24) and the new subnet is subnet-fe21 (192.168.6.0/25). Then, the ECS subnet is changed.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel