Floating IPs
Creating and attaching at Floating IP to an instance
A Floating IP is a fixed public IP address that you can move between your instances.
In this guide, we'll walk through how to create a floating IP and attach it to your instance in the following steps:
Create a Floating IP
Create a network, subnet, router and interface
Add a port to your instance
Assign the Floating IP to your instance
This guide assumes you already have an active cloud instance.
Create a Floating IP
In the OCS navigation, head to Cloud → Floating IPs then press the "+" button in the bottom right corner ("Create floating ip").
Under "Region selection", choose the region where your instance is located, for "Network selection", select the Public network for that region.
You can optionally add a description for your reference.
Click "Create".
Floating IPs are billed on an hourly basis. Make sure to factor this in to your budget as you plan your cloud setup. Networks, routers and subnets are free of charge.
Create a network
Next, in the navigation, head to Cloud → Networks.
Then, in the bottom right-hand button, select "Create New Network"
Give your network a name (and optional description), make sure the region is the same as where your instance is located, then click "Create".
Add a subnet to your network
Next, from the Networks page, hover over your newly-created network, and click the "Add Subnet" icon.
In the radio group, select "Enter address manually" and select a subnet address range. In this example we'll use 192.168.81.0/24
.
Leave "IPv4", "Enable DHCP" and all other settings as-is.
Then click "Add Subnet".
Create a router
Next we need to create a router.
To do this, head to Cloud → Routers then click the "+" icon at the bottom right.
Select the same region as previously, give your router a name (and optional description), and select the public network for that region.
Then click "Create".
Add an interface to your router
From the Cloud → Routers page, hover over your newly-created router and select the "Add Interface" button.
Next, select the subnet you created earlier, and choose an IP address within its range. For this example, we're going to choose 192.168.81.2
.
Add a port to your instance
Next, from Cloud → Instances, navigate to the instance you'd like to attach your floating IP address to.
Click on the instance to see its controls page, then head to the "Networking" tab and select "Add Port".
In the popup modal, select your newly-created network and subnet, and click "Add Port"
Assign Floating IP
Finally, select "Assign Floating IP", and select your newly-created Floating IP and Port in the dropdowns.
Then click "Associate IP". You'll see a message briefly appear
That's it! Your instance now has a Floating IP assigned to it.
Reach out to our team if you have any problems or need help.
Last updated