Floating ip adress for instance

1- Operating principle

As seen previously for a classic network configuration on NOVA, each instance has an interface with a fixed private IP address. Although this allows external communication via the router’s address translation, it is not sufficient for connecting to the project from outside. To do this, a floating IP from the public network must be used. A floating IP is a project object linked to the public network subnet and its resource quota. It must be allocated before being associated with or dissociated from an instance network interface. It can then be released.

Run the following command to see the list of floating IP addresses allocated in the project.

openstack floating ip list

2- Automatic DNS declaration

A declaration associating the public IP address of the floating IP with a name (type A DNS declaration) is automatically attempted on the UGA DNS server (IPAM API). To use this feature, you must fill in the dns_name and dns_domain attributes when allocating the floating IP. dns_name is the left part before the first ‘.’ of the Fully Qualified Domain Name. dns_domain is the part to the right of the first ‘.’ in the FQDN up to and including the final ‘.’ which is mandatory. The authorised domains are limited to ‘nova.u-ga.fr.’, ‘u-ga.fr.’ and ‘univ-grenoble-alpes.fr.’. As the aim is to give a public name to the computing instances, the technical domain ‘u-ga.fr.’ is ideal. The subdomain ‘nova.u-ga.fr.’ is available to reduce the risk of conflict with an existing DNS name. This is because, in the event of a conflict, the declarations fail silently without interrupting the allocation of the floating IP. One suggestion to avoid any potential conflict is to choose dns_domainnova.u-ga.fr.’ with dns_name -.

The allocation of the floating IP also triggers the reverse DNS declaration of type PTR. These declarations are automatically deleted when the floating IP is released and when it is still associated with an instance at the time of its destruction.

Please note that if you wish to retain your DNS declaration when deleting your VM, you must remember to dissociate your floating IP before deletion.

3- Allocate a floating IP

To allocate a floating IP to the project, you must create an address in the public subnet. To do this, run the command:

openstack floating ip create \
--dns-name <DNSname> --dns-domain nova.u-ga.fr. \
public

4- Associate a floating IP with an instance

The association can be done when instantiating the VM or afterwards, see Accessing VMs.