Elastic IPs
In this article:
Elastic IPs#
General information#
In K2 Cloud, instance network interfaces have Private IP in the internal virtual network, which is required for proper operation in the network infrastructure. Private IP is allocated automatically when the interface is created, and cannot be changed.
To ensure access to the instance from the outside, associate an Elastic IP (external address) to its network interface.
K2 Cloud provides public Elastic IP addresses, but you can also register your own provider-independent IPv4 address blocks (and make K2 Cloud responsible for broadcasting BGP routes) and use them in your projects:
operating with high reputation IP addresses (for email services);
simplifying the migration to the Cloud — when there are a lot of access lists containing specific address block;
problem prevention when government agencies block cloud provider subnets;
support of devices with certain IPs hardcoded in it;
compliance of different regulations;
saving the money — you don’t pay for using your own IP addresses.
If an instance does not need external access, then the Elastic IP may be deleted.
Available quotas#
The following default quotas are allocated for an Elastic IP address:
30 Elastic IP addresses per a project in each region.
If necessary, you can increase quotas. To do this, contact the support service via the support portal or by email support@k2.cloud.
Allocating Elastic IP#
When allocating Elastic IP, you will be suggested to choose an IP address pool from which the Elastic IP address will be allocated.
By default — the Elastic IP address range provisioned by K2 Cloud.
Important
If an allocated Elastic IP has not been used for two months (was not assigned to a network interface), then it will be automatically deleted. After the IP address is deleted, there is no guarantee that the same Elastic IP will be allocated next time.
Owned by user — The pool of IPv4 addresses of your organization in a registered range.
Note
This pool is available if you have registered your one or more provider-independent range of addresses (see Provisioning an IP address range). Unlike the K2 Cloud pool, you can specify a specific IP address, otherwise a free random address from your pool will be allocated.
DDoS protected — Elastic IP addresses in this pool are protected by servicepipe provider against DDoS attacks.
To allocate an Elastic IP:
Go to Virtual machines Networking Elastic IPs.
Click Allocate Elastic IP.
In the dialog window:
Specify the Name tag for the allocated IP address (optional).
Select the address pool from which the IP address will be allocated.
Specify which IP address to allocate from the available range (for the custom address pool only).
If you want to specify additional tags, click Add tags to go to the next step. If the Name tag was not specified in the previous step, set its value by clicking Add Name tag. To assign an arbitrary tag, click Add tag. Specify the tag key and its value.
Once all parameters are set, click Allocate.
Elastic IP association#
You can associate an unused Elastic IP address with an instance network interface in any VPC to which an internet gateway is attached.
Go to Virtual machines Networking Elastic IPs.
Select the IP address from the resource table and click Associate.
In the window that opens, select whether you want to associate Elastic IP with an instance or network interface. From the drop-down list, select the resource with which the Elastic IP address will be associated.
Note
When you select an instance, the Elastic IP associated will be associated with its primary network interface.
Click Associate to complete the operation.
Note
Once the Elastic IP is associated, the network interface becomes available at the specified address within a minute.
Elastic IP can also be associated on its page in the Information tab.
Elastic IP disassociation#
Elastic IP can be disassociated only if it is associated with any resource (otherwise the button will be inactive). Once the Elastic IP address has been disassociated, it can be re-associated with an instance network interface or deleted.
To disassociate Elastic IP:
Go to Virtual machines Networking Elastic IPs.
Select the associated IP address from the resource table and click Disassociate.
In the dialog window, confirm the action.
Elastic IP can also be disassociated on its page in the Information tab.
Provisioning an IP address range#
You can send a request to register your own provider-independent block of IPv4 addresses to the K2 Cloud support directly from the web interface. If necessary, our specialist will contact you to get more details. Once IP addresses are registered, you will receive a notification to the specified e-mail address. You can also check the registration status, for example, using the API method DescribeByoipCidrs. The address block status should change from pending-provision to advertised.
Go to Virtual machines Networking Elastic IPs.
Click Provision IP range.
In the new window, enter the IPv4 address range in CIDR notation. Provide additional relevant information in the Description field.
Click Submit request.
Note
To deprovision IP address range, contact support service or use the API method DeprovisionByoipCidr.
Alarm setup#
You can use alarms to receive notifications when the traffic through an Elastic IP address go beyond the specified threshold.
Create alarm#
Note
Alarm can also be created in the section Monitoring Alarms.
Go to Virtual machines Networking Elastic IPs.
Find the required Elastic IP address in the resource table and click the resource name to go to its page.
Open the Alarms tab and click Create.
In the window that opens, select the metrics to be monitored:
InternetTrafficIn — The amount of incoming Internet traffic over a predefined interval.
InternetTrafficOut — The amount of outgoing Internet traffic over a predefined interval.
BilledInternetTrafficIn — The amount of billable incoming Internet traffic over a predefined interval.
BilledInternetTrafficOut — The amount of billable outgoing Internet traffic over a predefined interval.
Click Next.
Set alarm metrics (for details, see Alarms section):
the alarm name and, optionally, its description;
statistics;
the condition of triggering an alarm for the selected metric. It includes a comparison operator and a threshold value;
the number and duration of time periods, over which metric values are collected.
If necessary, you can also change the metric selected in the previous step.
Optionally, you can also specify the emails to which notifications will be sent when the alarm state changes (for details, see the Alarms page). To do this, go to the next step by clicking Set actions.
Once you have made all the required adjustments, click Create.
Change the alarm#
To change the alarm:
Go to Virtual machines Networking Elastic IPs.
Find the required Elastic IP address in the resource table and click the resource name to go to its page.
Open the Alarms tab, select the desired alarm in the table and click Modify.
The dialog window will open at the Parameters step. Modify the required alarm parameters:
statistics;
the condition of triggering an alarm for the selected metric. It includes a comparison operator and a threshold value;
monitored metrics;
the number and duration of time periods, over which metric values are collected.
If you do not need to modify actions that the alarm triggers, save changes by clicking Modify. Otherwise, click Set actions.
If you need to modify or cancel previously configured notifications or add more addresses for notifications, click Set actions to proceed to the next step.
Once you have made the required changes, click Modify to save them.
Delete the alarm#
Go to Virtual machines Networking Elastic IPs.
Find the required Elastic IP address in the resource table and click the resource name to go to its page.
Open the Alarms tab and select the alarm to be deleted in the alarm table. You can select multiple alarms at once.
Click Delete and confirm the action in the dialog window.
Deleting an Elastic IP#
Both associated and disassociated Elastic IPs can be deleted.
Go to Virtual machines Networking Elastic IPs.
In the resource table, select IP address and click Delete.
In the dialog window, confirm the action.
Elastic IP can also be deleted on its page in the Information tab.
Elastic IP information#
Information about allocated Elastic IPs can be viewed in the resource table in Virtual machines Networking Elastic IP.
To view details of a particular Elastic IP, find the desired address and click its ID. This will open the Elastic IP page.
The Information tab displays the main Elastic IP parameters :
name (Name tag);
Elastic IP address;
instance with which it is associated;
network interface with which it is associated;
private IP address of a network interface.
Here you can:
change Elastic IP name (Name tag);
In the Metrics tab, you can view the graphs of the monitored metrics. You can set the period the metric graph covers, statistics, and metric calculation interval. To automatically refresh the graph, enable Auto-refresh; to refresh it manually, click Refresh.
Important
Automatic refresh is not possible when a custom period and/or interval is selected.
The Alarms tab displays details of alarms configured for the resource:
state;
alarm name;
triggering condition.
Alarms can be filtered by a state and/or metrics.
Here you can create, modify or delete an alarm.
The Tags tab displays all tags assigned to the Elastic IP. You can add new, modify existing, and delete no-longer-needed tags.