Floating IP: what it is, how to get it and assign to instance

Floating IP is a public, static IP address for instances created only in a private subnet (that is, without a public network interface). Using floating IP, such an instance will be able to accept incoming connections from the Internet.

Please note: the private subnet of the instance must be routable. Routing can be enabled in the subnet settings.

What it is used for
How it works
Billing
Check if your subnet is routable
Reserve a floating IP
     • From the menu
     • When creating an instance
Assign a floating IP to an instance
Detach a floating IP from an instance
Delete a floating IP

What it is used for

With a floating IP, you can rapidly provide access from an external network to the instance without a public network interface. Assign an address to an instance, and you will be able to connect to it.

Access can be organized in another way — by creating a public interface for the device. But in that case, public and private routed interfaces will have conflict because both are routes for accessing the Internet. You will have to manually configure the routing. If you need access to an external network only for a while, or you just don't want to deal with routing configuring, floating IP is the perfect solution.

How it works

You reserve a floating IP and assign it to the instance. When packets for this IP come to the router, it gives them to your device. When packets come back from the instance, the router sends them on behalf of the floating IP.

Billing

The monthly price for a floating IP is shown in the order window. You pay only for the time you use it: from creating to deleting. For example, if you buy an IP address and then delete it after an hour, you will be charged only for an hour of use. The price doesn’t depend on whether the IP address is assigned to an instance or not.

1.png

Check if your subnet is routable

Open the "Networking" section, select the required network and go to the settings of the subnet your equipment is included in. The "Enable router gateway" slider must be enabled — it makes the subnet routable (servers inside such a subnet can access the Internet and receive incoming connections).

mceclip0.png

mceclip1.png4.png

Reserve a floating IP from the menu

A floating IP is issued by a specific data center. The address is linked to its location and can be assigned only to an instance in the same location. Select the region where your machine is located and go to the "Networking" section.

mceclip2.pngOpen the “Floating IPs” section. You can create an IP without assigning it to the machine. To do this, simply click on "Create Floating IP".

mceclip3.pngAlso, you can create an IP and immediately assign it to a specific instance. To do this, enable the “Assign to existed instance” slider, select the machine and interface, and click “Create a new floating IP”.

7.png

Reserve a floating IP when creating an instance

When creating an instance, in the "Network settings" section, select the "Private" network type. Specify network and subnet of the interface you want to assign floating IP to. Enable the “Use floating IP” slider, click “Create a new floating IP” and save the settings using the “Add Interface” button.

8.png

The instance will be created with a private interface and a new floating IP assigned to it.

Assign a floating IP to an instance

Next to the free IP, click "Assign to instance" or select this option from the selector on the right.

9.pngIn the pop-up window, select the instance and the network interface this floating IP will be assigned to. Click "Assign floating IP".

10.png

Detach a floating IP from an instance

You can detach an IP address in the "Floating IPs" section or in the instance menu.

In the "Floating IP" section, click the selector next to the address and select "Detach from Instance". The IP will no longer be assigned to this machine.

mceclip4.pngIn the instance menu, open the "Networking" tab and select the private interface. Open the selector and click "Detach Subnetwork". The IP will no longer be assigned to this machine.

12.png

Delete a floating IP

In the "Floating IPs" section, click the selector next to the desired address and select "Delete". The IP will be removed, and you don't have to pay anymore.

mceclip5.png

 

 

Was this article helpful?
Recently viewed articles