When an instance boots, it is assigned a private IP address. This private IP address is only accessible within our virtual environment’s network. To access this instance to serve the rest of the network or the public, we need to assign it a floating IP, which is the range we configure when we set up public IP ranges.
Automatically assigning floating IPs to instances gives us the ability, in our environment, to have access to all instances on our network when using the Nova Network modes of Flat, FlatDHCP and VLAN Manager. Although there are times where we might want to manually assign addresses (for example, where we have a limited number of IPs assigned to a tenancy), the convenience of having this done for you is very beneficial and makes our OpenStack environment operate closely to how a cloud like Amazon EC2 operates for example.
To begin with, ensure you are logged in to the Controller node. If this was created using Vagrant, you can log into this node using the following command:
vagrant ssh controller
We will also be using the client machine, so log into your node that has Nova Client installed. If you haven’t created one, the Controller node has this client installed so this can also be used.
To ensure each of the instances gets a public (floating) IP address assigned to it when it is launched, carry out the following steps:
sudo nova-manage floating list
An example of the output when listing the floating IPs is shown as follows, truncated for brevity:
Instances aren’t automatically accessible outside of the OpenStack host unless a public IP address is assigned to them. Configuring our OpenStack environment so that each instance is assigned an address on launch makes the instances accessible from outside networks.
Get Updates on Tech posts, Interview & Certification questions and training schedules