How do I apply for a public IP if one was not assigned at the time of purchasing the CVM?
If a public IP was not assigned when you purchased the CVM, then there is no way to re-apply for an ordinary public IP for this CVM. However, the same function can be accomplished using EIPs. For more information on how to use this, please see Applying for EIPs. An EIP is a type of public IP that is fixed to a specific public IP address in a certain region. Unlike an ordinary public IP, it is bound to your account. In other words, you can bind and unbind an EIP with different CVMs as required (only one can be bound at a time).
Due to the special nature of an EIP, if you apply for an EIP but do not bind it to an instance, IP resource fees will be incurred. For details, please see EIP Billing. How can an instance (CVM or database) access the public network without a public IP address?
An instance without a public IP can apply for an EIP (see the previous question) or can access the public network through NAT gateway.
NAT gateway can provide SNAT and DNAT features for CVM instances in VPCs. If you have multiple instances and want them to access the public network through the same public IP, you can use a NAT gateway. Can the public IP of a CVM be changed?
Yes.
Note:
We recommend you immediately release the EIP after it is converted from a public IP. Otherwise, the EIP that is not bound to an instance will incur IP resource fees. Can a previously used public IP be recovered? Can a specific EIP be applied for?
You can recover public IPs that you have previously used and are not currently assigned to other users. Recovered public IPs are all EIPs. For more information, please see Retrieve the public network IP address. Can an increased quota be requested after the number of EIPs reaches the top limit?
Due to the limited EIP resources, you can apply for only 20 ones per account per region, and you cannot request an increased quota. CVM instances without public IPs can use NAT gateways and other methods to access the public network.
How does a CVM access the public network if it has a public IP or EIP and its subnet is also associated with a NAT gateway?
If a CVM has a public IP or EIP and its subnet is also associated with a NAT gateway (meaning the route table specifies that the next hop for the traffic of this subnet to access the public network is a NAT gateway), then the default setting is for all the traffic of this CVM to access the public network through the NAT gateway.
When a CVM instance accesses the public network through public gateway or NAT gateway, will the network fee be charged twice?
No, the network fee will only be charged once. When accessing the public network through public gateway or NAT gateway, only the corresponding public gateway network fee or NAT gateway network fee will be charged.
문제 해결에 도움이 되었나요?