Atom feed of this document
  
 

 Assign floating IP addresses

You can assign floating IP addresses to a project and to an instance.

  1. Run the following command to allocate a floating IP address to the current project. If more than one IP address pool is available, you can specify the pool from which to allocate the IP address. This example specifies the public pool:

    $ nova floating-ip-create public
    +--------------+-------------+----------+--------+
    | Ip           | Instance Id | Fixed Ip | Pool   |
    +--------------+-------------+----------+--------+
    | 172.24.4.225 | None        | None     | public |
    +--------------+-------------+----------+--------+
  2. After at least one floating IP address is allocated to the project, assign an IP address to an instance in the project, as follows:

    $ nova add-floating-ip INSTANCE_NAME_OR_ID FLOATING_IP

    After you assign the IP address and configure security group rules for the instance, the instance is publicly available at the floating IP address.

  3. To remove a floating IP address from an instance, specify the same arguments that you used to assign the IP address, but run the following command:

    $ nova remove-floating-ip INSTANCE_NAME_OR_ID FLOATING_IP
  4. To release a floating IP address from the current project, run the following command:

    $ nova floating-ip-delete FLOATING_IP

    The IP address is returned to the pool of IP addresses that are available for all projects. If an IP address is assigned to a running instance, it is disassociated from the instance.

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...