All Products
Search
Document Center

Server Load Balancer:Change the network type of an ALB instance

Last Updated:Mar 25, 2026

You can change the network type of an application load balancer (ALB) instance to meet your business requirements.

Instance network types

ALB instances support public and private network types. The following describes the differences:

  • Private: The ALB instance has only a private IP address. It can be accessed only by resources within the same VPC and is not accessible from the internet.

  • Public: The ALB instance has both a public IP address and a private IP address. By default, a public ALB instance uses an elastic IP address (EIP) to provide public services. If you select the Public network type, you are charged for the EIP instance and data transfer.

    To provide public services by using an anycast elastic IP address (Anycast EIP), you must associate an Anycast EIP with your ALB instance. For more information, see Associate an Anycast EIP with an ALB instance for nearby access across multiple regions.

IP version

ALB instances support the IPv4 and dual-stack IP versions. The following table describes the differences.

IP version

IPs per zone

Description

IPv4

  • A public ALB instance that uses the IPv4 version is assigned one public IPv4 address and one private IPv4 address in each zone.

  • A private ALB instance that uses the IPv4 version is assigned one private IPv4 address in each zone.

Clients can access the instance only by using IPv4 addresses, for example, 192.0.2.1.

The instance can only forward IPv4 client traffic to IPv4 backend servers. Supported backend server types include Elastic Compute Service (ECS) instances, elastic network interfaces (ENIs), Elastic Container Instances (ECIs), IP addresses, and Function Compute.

Dual-stack

  • A public ALB instance that uses the dual-stack version is assigned one public IPv4 address, one private IPv4 address, and one IPv6 address in each zone.

  • A private ALB instance that uses the dual-stack version is assigned one private IPv4 address and one IPv6 address in each zone.

Clients can access the instance using both IPv4 addresses (for example, 192.168.0.1) and IPv6 addresses (for example, 2001:db8:1:1:1:1:1:1).

The instance can forward IPv4 and IPv6 client traffic to IPv4 or IPv6 backend servers. Supported backend server types include ECS instances, ENIs, ECIs, and IP addresses. Function Compute is not supported.

Note

If the server group for your dual-stack ALB instance is of the IP type and you need to add IPv6 backend servers, you must upgrade the ALB instance.

ALB provides services through a DNS domain name. ALB works with DNS to resolve custom domain names. We recommend that you use CNAME resolution to point your custom domain name to the DNS name of the ALB instance. This makes it more convenient for you to access network resources. For more information, see Configure CNAME resolution for an ALB.

Public IP address types

ALB supports the following types of public IP addresses:

  • EIP: An EIP is a public IP address that you can purchase and hold independently. You can associate an EIP with a Classic Load Balancer (CLB) instance in a VPC, a private ALB instance, or a public NAT gateway. For more information, see What is an elastic IP address?.

  • Anycast EIP: An Anycast EIP is a public IP address that you can purchase and hold independently. Each Anycast EIP instance is assigned a public IP address. For more information, see What is an Anycast EIP?.

Note

For a comparison of Anycast EIPs and EIPs, see Comparison of Anycast EIPs and EIPs.

Limitations

Limitations on associating an Anycast EIP with an ALB instance:

The following table lists the regions where you can associate an Anycast EIP with an ALB instance.

Area

Region

China

China (Hong Kong)

Asia Pacific

South Korea (Seoul), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok)

Europe and Americas

UK (London), US (Virginia), US (Silicon Valley), Germany (Frankfurt)

Limitations on associating an EIP with an ALB instance:

  • The EIPs that are associated with each zone of an ALB instance must be of the same type. For more information about the supported EIP types, see EIP types supported by ALB.

  • Before you associate an EIP with an ALB instance, make sure that the EIP is not added to an Internet Shared Bandwidth instance. To use an Internet Shared Bandwidth instance, you can add the EIP to the instance in the ALB console after the association. The line type of the EIP must be the same as that of the Internet Shared Bandwidth instance. For more information about how to add an EIP to an Internet Shared Bandwidth instance, see Change the bandwidth of a public-facing instance.

Billing impact

  • ALB is billed on an hourly basis. A partial hour is billed as a full hour. A network type change takes about one minute to take effect. If you change the network type within a billing hour, you are charged for the full hour based on the billing rules of the previous network type. For more information, see Billing of ALB.

  • The following table describes the billing impact of changing the network type between public and private.

    Operation

    Scenario

    Method

    Billing impact

    Related documentation

    Change an IPv4 instance from private to public

    The ALB instance needs to provide IPv4 services over the internet.

    Assign an EIP or an Anycast EIP.

    If you assign an EIP or an Anycast EIP to the ALB instance, you are charged for internet data transfer through the EIP or Anycast EIP.

    Change an IPv4 instance from public to private

    The ALB instance no longer needs to provide IPv4 services over the internet.

    Disassociate the EIP or Anycast EIP.

    After the change, refer to your bill for actual charges.

    -

    Change an IPv6 instance from private to public

    The ALB instance needs to provide IPv6 services over the internet.

    Enable public bandwidth for the IPv6 gateway.

    Enabling public bandwidth for the IPv6 gateway incurs fees.

    Billing of IPv6 gateways

    Change an IPv6 instance from public to private

    The ALB instance no longer needs to provide IPv6 services over the internet.

    Disable public bandwidth for the IPv6 gateway.

    After the change, refer to your bill for actual charges.

    -

Prerequisites

An ALB instance is required. For more information, see Create and manage an ALB instance.

Change IPv4 instance network type

Change from private to public

When an instance is changed from private to public, you need to assign a public IP address to the ALB instance. You can assign an EIP or an Anycast EIP to the ALB instance. This operation will incur public network fees. For more information, see Elastic IP Address Billing and Anycast EIP Billing.

  1. Log on to the ALB console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, find the private ALB instance that you want to manage and click its ID.

  4. On the Instance Details tab, go to the Basic Information section. In the Network Type field, find the IPv4 entry and click Change Network Type.

  5. In the Change Network Type dialog box, select an IP Type, assign a public IP address based on your business requirements, and then click OK.

    • Assign an EIP

      1. Set IP Type to EIP.

      2. From the Assign EIP drop-down list for a zone, select Purchase EIP or select an available EIP.

      Note
      • You must assign an EIP to each zone.

      • If the ALB instance must use a specific EIP, you can manage its association by adding or removing zones. For more information about how to change zones, see Update the zones of an instance.

      • If you select Purchase EIP, take note of the following points:

        • Changing the network type of an ALB instance may affect services. The EIPs that were created with the public ALB instance are automatically disassociated or released and cannot be recovered after the network type is changed.

        • You can view the parameters of purchased EIPs in the EIP console.

        • A newly purchased EIP is a pay-as-you-go (pay-by-data-transfer) BGP (Multi-ISP) EIP that is protected by Anti-DDoS Origin Basic.

    • Assign an Anycast EIP

      For more information about the limits and procedure for associating an Anycast EIP with an ALB instance, see Associate an Anycast EIP with an ALB instance for nearby access across multiple regions.

      1. Set IP Type to Anycast EIP.

      2. From the Assign Anycast EIP drop-down list for a zone, select Purchase Anycast EIP or select an available Anycast EIP, and then click OK.

        Note

        You must assign an Anycast EIP to each zone.

        If you select Purchase Anycast EIP, take note of the following points:

        • If the network type of an ALB instance is changed to private or the instance is released, the associated Anycast EIP is automatically disassociated and released.

        • You can view the parameters of purchased Anycast EIPs in the Anycast EIP console.

  6. On the Instance Details tab, check the Network Type.

    The change takes about one minute to take effect. On the Instance Details tab, the operation is successful if the Network Type for IPv4 changes to Public.

Change from public to private

When you change the network type of an ALB instance from public to private, all EIPs are disassociated from the instance, and the domain name of the instance is updated to resolve to the private IP address. Proceed with caution.

  1. Log on to the ALB console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, find the public ALB instance that you want to manage and click its ID.

  4. On the Instance Details tab, go to the Basic Information section. In the Network Type field, find the IPv4 entry and click Change Network Type.

  5. In the dialog box that appears, review the impact of the change and click OK.

  6. On the Instance Details tab, check the Network Type.

    The change takes about one minute to take effect. On the Instance Details tab, the operation is successful if the Network Type for IPv4 changes to Private.

Change dual-stack instance network type

Change from private to public

  • To change the network type for IPv4 from private to public, see Change the network type of an IPv4 instance.

  • To change the network type for IPv6 from private to public, perform the following steps.

    Note

    Changing the network type for IPv6 from private to public enables public bandwidth for the IPv6 gateway in the VPC, which incurs fees. Public bandwidth is automatically enabled or disabled when you switch the network type of the ALB instance between public and private. For more information, see Billing of IPv6 gateways.

  1. Log on to the ALB console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, find the private ALB instance that you want to manage and click its ID.

  4. On the Instance Details tab, go to the Basic Information section. In the Network Type field, find the IPv6 entry and click Change Network Type.

  5. In the Change Network Type dialog box, confirm the information and click OK.

    Note

    If no IPv6 gateway exists in the VPC where the ALB instance is deployed, follow the on-screen instructions to create one.

  6. On the Instance Details tab, check the Network Type.

    The change takes about one minute to take effect. On the Instance Details tab, the operation is successful if the Network Type for IPv6 changes to Public.

Change from public to private

  1. Log on to the ALB console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, find the public ALB instance that you want to manage and click its ID.

  4. On the Instance Details tab, go to the Basic Information section. In the Network Type field, find the IPv6 entry and click Change Network Type.

  5. In the Disable Elastic IPv6 dialog box, review the impact of the change and click Disable.

  6. On the Instance Details tab, check the Network Type.

    The change takes about one minute to take effect. On the Instance Details tab, the operation is successful if the Network Type for IPv6 changes to Private.

Related documentation