We have seen that the Neutron CLI allows users to create a floating IP address independent of the existence of an instance. We will now show you how to associate a floating IP address to an instance using CLI.
For this recipe, you will need to know the virtual interface or the Port of the instance to which you need to bind the floating IP address. You will also need the following information:
The login credentials for SSH to a node where the Neutron client packages are installed
A shell RC file that initializes the environment variables for CLI
Using the appropriate credentials, SSH into the OpenStack node where the Neutron client software packages are installed.
Source the shell RC file to initialize the environment variables required for the CLI commands.
We will first execute the
neutron port-list
command to identify the ID of the virtual interface port to which the floating IP will be assigned...