All Products
Search
Document Center

Elastic Compute Service:IP addresses of ECS instances in the classic network

Last Updated:May 15, 2024

IP addresses are used to connect to Elastic Compute Service (ECS) instances or services deployed on ECS instances. Two types of IP addresses can be assigned to ECS instances in the classic network: internal IP addresses and public IP addresses. This topic describes the concepts, usage scenarios, operations, and billing of internal and public IP addresses in the classic network.

Internal IP addresses

Each ECS instance in the classic network is assigned an internal IP address for communication over the internal network.

Note

Internal IP addresses of ECS instances in the classic network do not support multicasting or broadcasting.

Internal IP addresses can be used in the following scenarios:

  • Load balancing

  • Communication over the internal network between ECS instances within the same LAN

  • Communication over the internal network between an ECS instance and other cloud services, such as Object Storage Service (OSS) and ApsaraDB RDS, within the same LAN

The internal IP addresses of ECS instances in the classic network are assigned by the system and cannot be changed.

Warning

Do not change internal IP addresses within operating systems. Otherwise, communication over the internal network may be interrupted.

Public IP addresses

If you set the public bandwidth of an instance to a value greater than 0 when you purchase the instance in the classic network, the system assigns a public IP address to the instance.

Public IP addresses can be used in the following scenarios:

  • Communication between ECS instances and the Internet

  • Communication between an ECS instance and other cloud services that are not within the same LAN

The following section describes the operations related to public IP addresses:

  • If you select Assign Public IP Address when you create an ECS instance in the classic network, the system assigns a public IP address to the instance. For more information, see Create an instance on the Custom Launch tab.

    Note

    After the system assigns a public IP address to an ECS instance in the classic network, you cannot release or disassociate the public IP address. If you set the public bandwidth of an instance to 0 Mbit/s when you downgrade the configurations of the instance during renewal or change the bandwidth of a pay-as-you-go instance, the instance cannot connect to the Internet but the public IP address is retained.

  • If you do not select Assign Public IP Address when you create an ECS instance in the classic network, you can assign a public IP address to the instance by modifying the outbound public bandwidth. For information about how to modify the public bandwidth of a subscription ECS instance, see Modify the bandwidth configurations of subscription instances. For information about how to modify the public bandwidth of a pay-as-you-go ECS instance, see Modify the bandwidth configurations of pay-as-you-go instances.

  • You can modify the public IP address of an instance only within six hours after the instance is created. For more information, see Change the public IP address of an instance.

  • When you manually release an ECS instance in the classic network, you can convert the public IP address of the instance into an elastic IP address (EIP). You can associate EIPs with ECS instances in virtual private clouds (VPCs) in various scenarios, such as network migration and flexible bandwidth adjustment. For more information, see Convert the system-assigned public IP address of an instance in the classic network into an EIP.

Billing

You are not charged for communication traffic generated when you use internal IP addresses.

You are charged only for outbound Internet traffic. For more information, see Public bandwidth.

References

  • For information about the differences between VPCs and the classic network, see Network types.

  • You can connect an instance that is deployed in the classic network to a VPC to allow the instance to communicate with cloud resources in the VPC over the internal network. You can call the following API operations: