(: September 22, 2019)

You want to assign an OpenStack Instance a floating IP address from your public network?. When an virtual instance is created in OpenStack, it is automatically assigned a fixed IP in the network to which it is assigned . This IP address is permanently associated with the instance until the instance is terminated.

OpenStack also gives you an option to use floating IP address created from external network’s subnet. A “floating IP” is an IP address that can be dynamically added to a running virtual instance. The floating IP association can be modified at any time regardless of the state of the instance in question.

Here is the process you’ll use to create a floating IP Address in OpenStack and assign it to an instance.

.td_uid_2_5d90a2f0b2fdb_rand.td-a-rec-img{text-align:left}.td_uid_2_5d90a2f0b2fdb_rand.td-a-rec-img img{margin:0 auto 0 0}

Step 1: Create an Instance on private network

First create a Virtual instance from OpenStack horizon dashboard or CLI in a private network.

I have two networks – public and private. The instance will be created on the private subnet.

$ openstack network list
| ID                                   | Name    | Subnets                              |
| b94431cb-08cf-42ea-be61-55f5cf459276 | private | 57601b99-ea64-41a8-a927-fbd591ae3f2b |
| f7ccac3b-73eb-49bf-a4ec-af750216b819 | public  | 7536e4a8-6aa8-45dc-aed6-1a98afcf416d |

$ openstack subnet list
| ID                                   | Name           | Network                              | Subnet         |
| 57601b99-ea64-41a8-a927-fbd591ae3f2b | private_subnet | b94431cb-08cf-42ea-be61-55f5cf459276 |   |
| 7536e4a8-6aa8-45dc-aed6-1a98afcf416d | public_subnet  | f7ccac3b-73eb-49bf-a4ec-af750216b819 | |

I’ll create an Instance called testfloating from Ubuntu 18.04 template.

openstack server create 
 --image Ubuntu-18 
 --key-name jmutai 
 --flavor m1.small 
 --security-group  7fffea2a-b756-473a-a13a-219dd0f1913a  
 --network private  

VM creation can be done from your OpenStack Dashboard.

After creation, confirm the server is running.

$ openstack server show testfloating
| Field                               | Value                                                    |
| OS-DCF:diskConfig                   | MANUAL                                                   |
| OS-EXT-AZ:availability_zone         | nova                                                     |
| OS-EXT-SRV-ATTR:host                | server1.sxi.io                            |
| OS-EXT-SRV-ATTR:hypervisor_hostname | server1.sxi.io                            |
| OS-EXT-SRV-ATTR:instance_name       | instance-0000002e                                        |
| OS-EXT-STS:power_state              | Running                                                  |
| OS-EXT-STS:task_state               | None                                                     |
| OS-EXT-STS:vm_state                 | active                                                   |
| OS-SRV-USG:launched_at              | 2019-09-22T07:13:40.000000                               |
| OS-SRV-USG:terminated_at            | None                                                     |
| accessIPv4                          |                                                          |
| accessIPv6                          |                                                          |
| addresses                           | private=                                      |
| config_drive                        |                                                          |
| created                             | 2019-09-22T07:13:35Z                                     |
| flavor                              | m1.small (1)                                             |
| hostId                              | da0a05ef20a03e97f301563551bab9b669ef04adbce232d941519946 |
| id                                  | a731e48d-d3b5-4fcf-8fc7-f8f280b51b44                     |
| image                               | Ubuntu-18 (7bd462ad-cc11-4d89-8b85-9aab0cfe114b)         |
| key_name                            | jmutai                                                   |
| name                                | testfloating                                             |
| progress                            | 0                                                        |
| project_id                          | 06bcc3c56ab1489282b65681e782d7f6                         |
| properties                          |                                                          |
| security_groups                     | name='default'                                           |
| status                              | ACTIVE                                                   |
| updated                             | 2019-09-22T07:13:40Z                                     |
| user_id                             | 336acbb7421f47f8be4891eabf0c9cc8                         |
| volumes_attached                    |                                                          |

Step 2: Reserve a specific floating IP address from external network pool.

You need to reserve a floating IP address from external network subnet pool. This can be done from the web dashboard or CLI.

From CLI:

openstack floating ip create --project admin --subnet public_subnet public


  • admin is the Owner’s project. Created floating IP will be available for association in this project.
  • public_subnet is the name of the subnet on which you want to create the floating IP.
  • public is the name of the network to allocate floating IP from.

See all options by typing:

$ openstack floating ip create --help

From Dashboard:

Log in to the dashboard as a user that has the Member role. The navigate to:

Project > Network > Floating IPs

Click on the “ALLOCATE IP TO PROJECT” button. On the new window, select a Pool, provide description and click on “ALLOCATE IP“.

Step 3: Associate the reserved floating IP address with the instance.

Once the floating IP address is reserved, we can associate it with an instance.

From CLI:

$ openstack floating ip list
$ openstack server list
$ openstack server add floating ip <server> <ip-address>

# Example:
$ openstack server add floating ip testfloating

From dashboard:

Option 1: Project > Network > Floating IPs > Select IP > Associate

Pick a floating IP, an instance and a port to associate.

Option 2: Project > Compute > Instances

Under actions, select “ASSOCIATE FLOATING IP”

Select an IP address and click “ASSOCIATE”.

Disassociate a floating IP Address

To disassociate IP address, use either of below methods:


$ openstack server remove floating ip <server> <ip-address>


  • Project > Network > Floating IPs > DISASSOCIATE
  • Project > Compute > Instances > Actions > DISASSOCIATE FLOATING IP

That’s all on how to associate a floating IP address to an instance running on OpenStack.

Other OpenStack guides:

How To Create OpenStack Instance With a Fixed / Static IP Address

How To Create OpenStack projects, users and roles

How To Migrate OpenStack Instance from one Compute Host to Another

How To Resize OpenStack Instance / Virtual Machine

How To Configure OpenStack Instances / VMs to Autostart after Nova compute reboot

How To Create OpenStack Cinder Volumes and Attach to a VM Instance

.td_uid_4_5d90a2f0b3353_rand.td-a-rec-img{text-align:left}.td_uid_4_5d90a2f0b3353_rand.td-a-rec-img img{margin:0 auto 0 0}
  • Ethereum Launches Own ‘Ether’ Coin, With Millions Already Sold
  • How to restart a process out of crontab on a Linux/Unix
  • Best Gnome gtk3 themes for Kali Linux 2.0,Debian and Ubuntu
  • How to run Local Openshift Cluster with Minishift
  • White Shoe to Wild West: Lawyers to Launch Blockchain-Only Law Firm
  • Payments Giant Qiwi is Building a Blockchain Replacement for its Core Database
  • Canadian Senate Panel Calls for ‘Light Touch’ Bitcoin Regulation
  • Crypto Investing May Have Finally Met Its Tinder Match
  • FBI: No Illegal Techniques Used in Silk Road Investigation
  • Why Bitcoin is Going Up today $15000
  • How to Build a Server at Home
  • How To Create a Swap File on Linux
  • Linux Distribution Comparison
  • New York State Department of Financial Services Announces Bitcoin Hearings
  • Europe’s First Bitcoin Centre to Open in France
  • SXI LLC Company
    SXI.IO is a global Blockchain software company, specialized in developing white label crypto exchange platforms , Wallet platforms, ICO platforms, Token Erc20 .....
    Fully Managed VPS Fully Managed VPS Fully Managed VPS

    You Might Also Enjoy NewS Post

    Best Free Web Hosting 2020

    Free Hosting 1GB $0.00 USD/mo Disk space 1GB Traffic 10GB/Month Domains 2 Plesk Cpanel Databases 10 Free 12 Month https://my.sxi.io/cart.php?a=add&pid=196

    02/05/2020 READ MORE