How to apply for a public IP if a cloud server is not assigned a public IP when purchased?
If you did not allocate a public network when purchasing a cloud server, you cannot apply for a regular public IP for that cloud server. However, you can achieve the same functionality through an EIP.
- An EIP is a type of public IP address that remains fixed within a region. Unlike regular public IPs, it is bind to your account, meaning you can bind and unbind an EIP to different cloud servers as needed (one binding at a time).
- Due to the special nature of EIPs, if you have applied for an EIP but have not bind it to an instance, you will incur idle fees. For details, please refer to the billing of EIPs.
How do instances (cloud servers, databases) without a public IP address access the public Internet?
Instances without a public IP can apply for an EIP (refer to the previous question), or access the public Internet through a NAT Gateway.
NAT Gateway can provide both SNAT and DNAT functions for cloud servers within a private network. If you have multiple cloud servers that need to access the Internet through a single public IP, you can use NAT Gateway.
Can cloud servers change their public IP?
If your cloud server is bind to an EIP, you need to unbind that EIP, then apply for a new EIP or bind it with an existing one.
Can you apply to increase the quota after reaching the limit of EIPs?
Due to the limited resources of EIPs, each account can only apply for 20 per region and cannot apply for an increase in quota. For cloud servers without public IPs, you can use methods such as NAT Gateway to access the public Internet.
If a cloud server has a public IP or EIP, and the subnet it belongs to is associated with a NAT Gateway, how can public access be achieved?
If a cloud server has a public IP or EIP, and the subnet is associated with a NAT Gateway, meaning the route table sets the next hop of the subnet's public access traffic to the NAT Gateway, then by default, all traffic for accessing the public Internet from that cloud server will go through the NAT Gateway.
If you need to modify the priority so that the traffic of cloud servers accessing the public Internet goes through a public IP, please refer to adjusting the priority of NAT Gateway and public IP.