openstack-manuals/doc/user-guide-admin/section_cli_nova_floating_ips.xml
Christian Berendt bbec5aa4d2 Unified the syntax of the XML root element (user-guide-admin)
The XML root element of Docbook XML files should match the following
format:

<ELEMENT 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="THE_XML_ID_OF_THE_ELEMENT">

Change-Id: If8d27898af12af2edc2d2d13557ec2365a241656
2014-07-09 21:25:59 +02:00

110 lines
6.8 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="manage_ip_addresses">
<title>Manage IP addresses</title>
<para>Each instance has a private, fixed IP address (assigned when launched) and can also have a
public, or floating, address. Private IP addresses are used for communication between
instances, and public addresses are used for communication with networks outside the cloud,
including the Internet.</para>
<para>
<itemizedlist>
<listitem>
<para>By default, both administrative and end users can associate floating IP
addresses with projects and instances. You can change user permissions for
managing IP addresses by updating the <filename>/etc/nova/policy.json</filename>
file. For basic floating-IP procedures, refer to the <citetitle>Manage IP
Addresses</citetitle> section in the <link
xlink:href="http://docs.openstack.org/user-guide/content/"
><citetitle>OpenStack End User Guide</citetitle></link>.</para>
</listitem>
<listitem>
<para>For details on creating public networks using OpenStack Networking
(<systemitem>neutron</systemitem>), refer to the <link
xlink:href="http://docs.openstack.org/admin-guide-cloud/content/"
><citetitle>OpenStack Cloud Administrator Guide</citetitle></link>. No
floating IP addresses are created by default in OpenStack Networking.</para>
</listitem>
</itemizedlist>
</para>
<para>As an administrator using legacy networking (<systemitem>nova-network</systemitem>), you
can use the following bulk commands to list, create, and delete ranges of floating IP
addresses. These addresses can then be associated with instances by end users:</para>
<variablelist>
<varlistentry><term>List addresses for all projects</term>
<listitem><para>To list all floating IP addresses for all projects, run:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-list</userinput>
<computeroutput>+------------+---------------+---------------+--------+-----------+
| project_id | address | instance_uuid | pool | interface |
+------------+---------------+---------------+--------+-----------+
| None | 172.24.4.225 | None | public | eth0 |
| None | 172.24.4.226 | None | public | eth0 |
| None | 172.24.4.227 | None | public | eth0 |
| None | 172.24.4.228 | None | public | eth0 |
| None | 172.24.4.229 | None | public | eth0 |
| None | 172.24.4.230 | None | public | eth0 |
| None | 172.24.4.231 | None | public | eth0 |
| None | 172.24.4.232 | None | public | eth0 |
| None | 172.24.4.233 | None | public | eth0 |
| None | 172.24.4.234 | None | public | eth0 |
| None | 172.24.4.235 | None | public | eth0 |
| None | 172.24.4.236 | None | public | eth0 |
| None | 172.24.4.237 | None | public | eth0 |
| None | 172.24.4.238 | None | public | eth0 |
| None | 192.168.253.1 | None | test | eth0 |
| None | 192.168.253.2 | None | test | eth0 |
| None | 192.168.253.3 | None | test | eth0 |
| None | 192.168.253.4 | None | test | eth0 |
| None | 192.168.253.5 | None | test | eth0 |
| None | 192.168.253.6 | None | test | eth0 |
+------------+---------------+---------------+--------+-----------+</computeroutput></screen></listitem>
</varlistentry>
<varlistentry><term>Bulk create floating IP addresses</term>
<listitem><para>To create a range of floating IP addresses, run:</para>
<para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-create [--pool <replaceable>POOL_NAME</replaceable>] [--interface <replaceable>INTERFACE</replaceable>] <replaceable>RANGE_TO_CREATE</replaceable></userinput></screen>
</para>
<para>For example:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-create --pool test 192.168.1.56/29</userinput></screen>
<para>By default, <command>floating-ip-bulk-create</command> uses the
<systemitem>public</systemitem> pool and <systemitem>eth0</systemitem>
interface values.</para>
<para>
<note>
<para>You should use a range of free IP addresses that is correct for your
network. If you are not sure, at least try to avoid the DHCP address
range:</para>
<para>
<itemizedlist>
<listitem>
<para>Pick a small range (/29 gives an 8 address range, 6 of
which will be usable)</para>
</listitem>
<listitem>
<para>Use <command>nmap</command> to check a range's
availability. For example, 192.168.1.56/29 represents a
small range of addresses (192.168.1.56-63, with 57-62
usable), and you could run the command <command>nmap -sn
192.168.1.56/29</command> to check whether the entire
range is currently unused.</para>
</listitem>
</itemizedlist>
</para>
</note>
</para>
</listitem>
</varlistentry>
<varlistentry><term>Bulk delete floating IP addresses</term>
<listitem><para>To delete a range of floating IP addresses, run:</para>
<para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-delete <replaceable>RANGE_TO_DELETE</replaceable></userinput></screen>
</para>
<para>For example:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-bulk-delete 192.168.1.56/29</userinput></screen>
</listitem>
</varlistentry>
</variablelist>
</section>