Help Center/ Elastic Cloud Server/ Best Practices/ Selection and Configuration/ Enabling Public Network Access for an ECS
Updated on 2025-08-07 GMT+08:00

Enabling Public Network Access for an ECS

This section describes how to enable public network access for an ECS.

Using IPv4 to Access Public Networks

Method

Scenario

Characteristics

Reference

Binding an EIP

Suitable for public network access in temporary or dynamic changes or specific scenarios.

  • Backend servers need to be frequently replaced or services need to be redeployed in temporary test environment, development environment, or demonstration environment.
  • Fast failover: If an ECS is faulty, you can quickly unbind the EIP from the faulty ECS and bind it to the standby ECS to minimize service interruption.
  • If multiple ECSs are added, the IP address for providing services externally needs to remain unchanged.
  • On a single ECS, multiple services that require independent public IP addresses to provide services externally are deployed.
  • An EIP is a public IP address that can be purchased and held independently.
  • It can be dynamically unbound from or bound to ECSs.
  • Compared with other methods, EIPs are flexible and easy to manage.

Binding an EIP

Network address translation using NAT Gateway

Suitable for scenarios where an EIP is shared by multiple ECSs

The SNAT function provided by the NAT Gateway service allows the ECSs in a VPC to access the Internet without requiring an EIP. Additionally, SNAT supports a large number of concurrent connections for applications that have a large number of requests and connections.

Can an ECS Without an EIP Bound Access the Internet?

Using ELB to distribute incoming traffic from public networks

Suitable for load balancing and distributing incoming traffic from public networks

After an EIP is bound to a private network load balancer, the load balancer becomes a public network load balancer. Clients can access backend servers through this load balancer over Internet.

For more information, see ELB Function Overview.

Using IPv6 to Access Public Networks

When purchasing an ECS, you can select a flavor that supports IPv6 and a primary network interface with IPv6 enabled. Then, bind an EIP to the ECS.

Method

Scenario

Characteristics

Reference

Assigning an IPv6 address with EIP bandwidth enabled

Suitable for applications or services that support IPv6

Compared with IPv4, IPv6 provides sufficient network addresses and more advanced network features. You can use IPv6 addresses to access public networks.

Using ELB to distribute incoming traffic from public networks

Suitable for load balancing and distributing incoming traffic from public networks

After an EIP is bound to a private network load balancer, the load balancer becomes a public network load balancer. Clients can access backend servers through this load balancer over Internet.

For more information, see ELB Function Overview.

Related Documents