64b6c9261e
Current folder name New folder name Book title ---------------------------------------------------------- basic-install DELETE cli-guide DELETE common common NEW admin-guide-cloud Cloud Administrators Guide docbkx-example DELETE openstack-block-storage-admin DELETE openstack-compute-admin DELETE openstack-config config-reference OpenStack Configuration Reference openstack-ha high-availability-guide OpenStack High Availabilty Guide openstack-image image-guide OpenStack Virtual Machine Image Guide openstack-install install-guide OpenStack Installation Guide openstack-network-connectivity-admin admin-guide-network OpenStack Networking Administration Guide openstack-object-storage-admin DELETE openstack-security security-guide OpenStack Security Guide openstack-training training-guide OpenStack Training Guide openstack-user user-guide OpenStack End User Guide openstack-user-admin user-guide-admin OpenStack Admin User Guide glossary NEW OpenStack Glossary bug: #1220407 Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7 author: diane fleming
110 lines
6.0 KiB
XML
110 lines
6.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section
|
|
xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
version="5.0"
|
|
xml:id="floating_ip_addresses">
|
|
<title>Manage Floating IP Addresses</title>
|
|
<para>A floating IP address is an IP address (typically public) that
|
|
can be dynamically assigned to an instance. Pools of floating IP
|
|
addresses are created outside of python-novaclient with the
|
|
<command>nova-manage floating *</command> commands. Refer to
|
|
"<uri
|
|
xlink:href="http://docs.openstack.org/trunk/openstack-compute/admin/content/associating-public-ip.html"
|
|
>Configuring Public (Floating) IP Addresses</uri>" in the
|
|
<emphasis>OpenStack Compute Administration Manual</emphasis> for
|
|
more information.</para>
|
|
<para>Before you begin, use <command>nova
|
|
floating-ip-pool-list</command> to determine what floating IP pools
|
|
are available.
|
|
<screen>
|
|
<prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput><computeroutput>
|
|
+------+
|
|
| name |
|
|
+------+
|
|
| nova |
|
|
+------+
|
|
</computeroutput> </screen>In this example,
|
|
the only available pool is <literal>nova</literal>.</para>
|
|
<section xml:id="floating_ip_reserve_add"><title>Reserve and associate floating IP addresses</title>
|
|
<para>You can reserve floating IP addresses with the <command>nova
|
|
floating-ip-create</command> command. This command reserves the
|
|
addresses for the tenant, but does not immediately associate that
|
|
address with an instance.
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>nova floating-ip-create nova</userinput><computeroutput>
|
|
+--------------+-------------+----------+------+
|
|
| Ip | Instance Id | Fixed Ip | Pool |
|
|
+--------------+-------------+----------+------+
|
|
| 50.56.12.232 | None | None | nova |
|
|
+--------------+-------------+----------+------+ </computeroutput>
|
|
</screen></para>
|
|
|
|
<para>The floating IP address has been reserved, and can now be
|
|
associated with an instance with the <command>nova
|
|
add-floating-ip</command> command. For this example, we'll associate
|
|
this IP address with an image called <literal>smallimage</literal>.
|
|
<screen>
|
|
<prompt>$</prompt> <userinput>nova add-floating-ip smallimage 50.56.12.232</userinput>
|
|
</screen>
|
|
After the command is complete, you can confirm that the IP address
|
|
has been associated with the <command>nova
|
|
floating-ip-list</command> and <command>nova-list</command>
|
|
commands.
|
|
<screen>
|
|
<prompt>$</prompt> <userinput>nova floating-ip-list</userinput><computeroutput>
|
|
+--------------+--------------------------------------+------------+------+
|
|
| Ip | Instance Id | Fixed Ip | Pool |
|
|
+--------------+--------------------------------------+------------+------+
|
|
| 50.56.12.232 | 542235df-8ba4-4d08-90c9-b79f5a77c04f | 10.4.113.9 | nova |
|
|
+--------------+--------------------------------------+------------+------+
|
|
</computeroutput>
|
|
<prompt>$</prompt> <userinput>nova list</userinput><computeroutput>
|
|
+--------------------------------------+------------+--------+-------------------------------------------------------+
|
|
| ID | Name | Status | Networks |
|
|
+--------------------------------------+------------+--------+-------------------------------------------------------+
|
|
| 4bb825ea-ea43-4771-a574-ca86ab429dcb | tinyimage2 | ACTIVE | public=10.4.113.6; private=172.16.101.6 |
|
|
| 542235df-8ba4-4d08-90c9-b79f5a77c04f | smallimage | ACTIVE | public=10.4.113.9, 50.56.12.232; private=172.16.101.9 |
|
|
+--------------------------------------+------------+--------+-------------------------------------------------------+
|
|
</computeroutput></screen>
|
|
The first table shows that the 50.56.12.232 is now associated with the
|
|
<literal>smallimage</literal> instance ID, and the second table shows
|
|
the IP address included under <literal>smallimage</literal>'s public
|
|
IP addresses.</para></section>
|
|
<section xml:id="floating_ip_address_remove"><title>Remove and de-allocate a floating IP address</title>
|
|
|
|
<para>To remove a floating IP address from an instance, use
|
|
the <command>nova remove-floating-ip</command>
|
|
command.<screen>
|
|
<prompt>$</prompt> <userinput>nova remove-floating-ip smallimage 50.56.12.232</userinput>
|
|
</screen>
|
|
After the command is complete, you can confirm that the IP address has
|
|
been associated with the <command>nova floating-ip-list</command> and
|
|
<command>nova-list</command> commands.
|
|
<screen>
|
|
<prompt>$</prompt> <userinput>nova floating-ip-list</userinput><computeroutput>
|
|
+--------------+-------------+----------+------+
|
|
| Ip | Instance Id | Fixed Ip | Pool |
|
|
+--------------+-------------+----------+------+
|
|
| 50.56.12.232 | None | None | nova |
|
|
+--------------+-------------+----------+------+</computeroutput>
|
|
<prompt>$</prompt> <userinput>nova list</userinput><computeroutput>
|
|
+--------------------------------------+------------+--------+-----------------------------------------+
|
|
| ID | Name | Status | Networks |
|
|
+--------------------------------------+------------+--------+-----------------------------------------+
|
|
| 4bb825ea-ea43-4771-a574-ca86ab429dcb | tinyimage2 | ACTIVE | public=10.4.113.6; private=172.16.101.6 |
|
|
| 542235df-8ba4-4d08-90c9-b79f5a77c04f | smallimage | ACTIVE | public=10.4.113.9; private=172.16.101.9 |
|
|
+--------------------------------------+------------+--------+-----------------------------------------+
|
|
</computeroutput> </screen>
|
|
You can now de-allocate the floating IP address, returning it to the pool so that it can be used by another tenant.
|
|
<screen>
|
|
<prompt>$</prompt> <userinput>nova floating-ip-delete 50.56.12.232</userinput>
|
|
</screen>
|
|
In this example, 50.56.12.232 was the only IP address allocated to this tenant. Running <command>nova floating-ip-list</command> after the de-allocation is complete will return no results.</para>
|
|
</section>
|
|
|
|
</section>
|
|
|