Change the network type of an NLB instance between public and private. To make a private instance public, associate it with an Elastic IP Address (EIP) or Anycast EIP.
Network types
NLB supports public and private network types:
private: Assigns a private IP address per zone. The NLB instance is accessible only within the Alibaba Cloud network.
public: Assigns a public and a private IP address per zone. A public NLB instance uses an EIP by default. EIP and bandwidth or data transfer fees apply. To use an Anycast EIP, associate one with the NLB instance.
IP version
NLB instances support IPv4 and dual-stack. The following table describes the differences.
IP version | Default IP address allocation (per zone) | Description |
IPv4 |
| Clients access the instance over IPv4 only, such as 192.168.0.1. |
dual-stack |
| Clients access the instance over IPv4 (such as 192.168.0.1) or IPv6 (such as 2001:db8:1:1:1:1:1:1). |
Public access methods
NLB supports the following public access methods:
EIP: an independently purchasable public IP address.
NoteNLB supports only pay-as-you-go EIPs that are billed by data transfer and not added to an Internet Shared Bandwidth instance.
Anycast EIP: an independently purchasable public IP address advertised across all supported access areas, regardless of region. For more information about the differences between an Anycast EIP and an EIP, see Comparison between Anycast EIPs and EIPs.
IPv6 Gateway: a public IPv6 traffic gateway for a VPC. Enable public bandwidth for an IPv6 address to allow the NLB instance to serve public IPv6 traffic.
Billing impact
NLB is billed hourly. Partial hours are billed as full hours. Network type changes take about one minute. If you change the type mid-hour, that hour is billed at the pre-change rate. Overview of NLB billable items.
Billing impact of switching between public and private:
Operation | Use cases | Method | Billing impact | Billing references |
Change private IPv4 to public | The NLB instance needs to provide public IPv4 services. | Associate an EIP or an Anycast EIP. | Associating an EIP or Anycast EIP with the NLB instance incurs public network charges. | |
Change public IPv4 to private | The NLB instance no longer needs to provide public IPv4 services. | Disassociate the EIP or Anycast EIP. | After the change, check your bill for actual charges. | None |
Change private IPv6 to public | The NLB instance needs to provide public IPv6 services. | Enable public bandwidth for the IPv6 gateway. | Enabling public bandwidth for the IPv6 gateway incurs charges. | |
Change public IPv6 to private | The NLB instance no longer needs to provide public IPv6 services. | Disable public bandwidth for the IPv6 gateway. | After the change, check your bill for actual charges. | None |
Change the network type for an IPv4 instance
Change a private instance to a public instance
When you change a private NLB instance to public, assign an EIP or Anycast EIP to the NLB instance. Public network fees apply (EIP billing, Anycast EIP billing details).
Log on to the NLB console.
In the top navigation bar, select the region where the instance is deployed.
On the Instances page, find the target private NLB instance and click the instance ID.
On the Instance Details tab, find the Basic Information section. In the Network Type row, click Change Network Type to the right of IPv4.
In the Change Network Type dialog box, select an IP Type, assign a public IP address, and then click OK.
Assign an EIP
Set IP Type to EIP.
From the Assign EIP drop-down list for each zone, select Purchase EIP or an available EIP.
NoteYou must assign an EIP to each zone in the list.
If you select Purchase EIP, the EIP is released when the NLB instance is released or changed to private, whereas if you select an existing EIP, it is retained when the NLB instance is released or changed to private.
You can view the parameters of your EIPs in the EIP console.
Assign an Anycast EIP
Set IP Type to Anycast EIP.
From the Assign Anycast EIP drop-down list for each zone, select Purchase Anycast EIP or an available Anycast EIP.
NoteYou must assign an Anycast EIP to each zone in the list.
If you select Purchase Anycast EIP, the Anycast EIP is released when the NLB instance is released or changed to private. If you select an existing Anycast EIP, it is retained when the NLB instance is released or changed to private.
You can view the parameters of your Anycast EIPs in the Anycast EIP console.
On the Instance Details tab, check the Network Type.
The change takes about one minute. The change succeeds when the Network Type for IPv4 changes to Public on the Instance Details tab.
Change a public instance to a private instance
When you change an NLB instance from public to private, all public IP addresses are disassociated and the DNS record resolves to a private IP address. Proceed with caution.
Log on to the NLB console.
In the top navigation bar, select the region where the instance is deployed.
On the Instances page, find the target public NLB instance and click the instance ID.
On the Instance Details tab, find the Basic Information section. In the Network Type row, click Change Network Type to the right of IPv4.
In the dialog box that appears, confirm the impact of the change and click OK.
On the Instance Details tab, check the Network Type.
The change takes about one minute. The change succeeds when the Network Type for IPv4 changes to Private on the Instance Details tab.
Change the network type for a dual-stack instance
Change a private instance to a public instance
To change the network type for IPv4 from private to public, see Change the network type for an IPv4 instance.
To change the network type for IPv6 from private to public, follow these steps.
NoteChanging IPv6 from private to public enables public bandwidth on the VPC's IPv6 gateway and incurs charges. Public bandwidth is automatically toggled when you switch the NLB instance's network type. For more information, see IPv6 gateway billing.
Log on to the NLB console.
In the top navigation bar, select the region where the instance is deployed.
On the Instances page, find the target private NLB instance and click the instance ID.
On the Instance Details tab, find the Basic Information section. In the Network Type row, click Change Network Type to the right of IPv6.
In the Change Network Type dialog box that appears, confirm the information and click OK.
NoteIf no IPv6 gateway exists in the NLB instance's VPC, follow the on-screen prompts to create one.
On the Instance Details tab, check the Network Type.
The change takes about one minute. The change succeeds when the Network Type for IPv6 changes to Public on the Instance Details tab.
Change a public instance to a private instance
To change the network type for IPv4 from public to private, see Change the network type for an IPv4 instance.
To change the network type for IPv6 from public to private, follow these steps.
Log on to the NLB console.
In the top navigation bar, select the region where the instance is deployed.
On the Instances page, find the target public NLB instance and click the instance ID.
On the Instance Details tab, find the Basic Information section. In the Network Type row, click Change Network Type to the right of IPv6.
In the Disable Elastic IPv6 dialog box that appears, confirm the impact of the change and click Disable.
On the Instance Details tab, check the Network Type.
The change takes about one minute. The change succeeds when the Network Type for IPv6 changes to Private on the Instance Details tab.