Elastic IP
An Elastic IP is a static public IPv4 address that you use to access resources inside the VPC from the internet. For example, by attaching an Elastic IP to the server that runs your web server, that server becomes reachable from the internet.
Elastic IPs are used for:
- Accessing a server from the internet
- A static IP for a NAT Gateway (outbound traffic)
How Elastic IPs Work
An Elastic IP belongs to one AZ and can only be attached to resources in that AZ. It isn't attached directly to the VPC; you attach it to a server or NAT Gateway inside the VPC.
Before using an Elastic IP, internet access (Network Gateway) must be enabled on the VPC. The guide to creating a VPC helps you with this. If the IP is attached to a server but the server isn't reachable from the internet, check that internet access is enabled on the VPC.
Allocating an Elastic IP
In the Arvancloud panel, go to the VPC section and select Elastic IP from the menu.
Click the Allocate Elastic IP button to configure it:
- AZ
Select the AZ you want to create the Elastic IP in. This AZ must be the same as the location of your server or NAT Gateway. This field is required.
Note that an Elastic IP can only be attached to resources in the same AZ.
- VPC Select the VPC you want; the Elastic IP is created for this VPC. This field is required.
Then click the Confirm button.
If the Elastic IP you created has no internet access, it may have been blocked due to regulations. In that case, delete it and create a new IP.
Attaching an Elastic IP to a Server
After creating it, click the three-dot menu of the IP in the Elastic IP list and select Attach Elastic IP.
On the page that opens, select the server you want to attach the Elastic IP to.
If the server's public IP changed after you rebuilt it, the Elastic IP wasn't attached to the server or had been detached. Attach the Elastic IP to the new server.
Attaching an Elastic IP to a NAT Gateway
You attach an Elastic IP to a NAT Gateway when creating the NAT Gateway, not from the Elastic IP list.
If you have attached Elastic IPs to both a server and a NAT Gateway, you are charged for two Elastic IPs. This is normal; if you don't need one of these IPs, release it.
Detaching an Elastic IP
In the Elastic IP list, click the three-dot menu of the IP and select Detach Elastic IP. In the confirmation window, type detach.
As long as an Elastic IP is attached to a resource, you can't release it; first detach it from the resource.
Note that after it is detached, the Elastic IP stays reserved in your account and is still charged.
Limits
| Limit | Value |
|---|---|
| Number of Elastic IPs per AZ | 20 |
| Number of Elastic IPs per server | 1 |
| Number of Elastic IPs per NAT Gateway | 1 |
Pricing
Each Elastic IP is charged monthly on a pay-as-you-go basis. Inbound (download) traffic to VPC resources is charged per GB, and upload traffic is free.
Note that a reserved IP, meaning an allocated IP that isn't attached to any resource, is charged. If you delete the VPC, your Elastic IP stays reserved and is still charged.