openstack-manuals/doc/user-guide-admin/section_nova_cli_floating_ips.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
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
2013-09-08 15:15:50 -07:00

107 lines
5.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="manage_ip_addresses"
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">
<title>Manage IP addresses</title>
<para>Each instance can have a private, or fixed, IP address and a
public, or floating, one.</para>
<para>Private IP addresses are used for communication between
instances, and public ones are used for communication with the
outside world.</para>
<para>When you launch an instance, it is automatically assigned a
private IP address that stays the same until you explicitly
terminate the instance. Rebooting an instance has no effect on
the private IP address.</para>
<para>A pool of floating IPs, configured by the cloud operator, is
available in OpenStack Compute.</para>
<para>You can allocate a certain number of these to a project: The
maximum number of floating IP addresses per project is defined
by the quota.</para>
<para>You can add a floating IP address from this set to an
instance of the project. Floating IP addresses can be
dynamically disassociated and associated with other instances
of the same project at any time.</para>
<para>Before you can assign a floating IP address to an instance,
you first must allocate floating IPs to a project. After
floating IP addresses have been allocated to the current
project, you can assign them to running instances.</para>
<para>One floating IP address can be assigned to only one instance
at a time. Floating IP addresses can be managed with the
<command>nova *floating-ip-*</command> commands, provided
by the python-novaclient package.</para>
<procedure>
<title>To list pools with floating IP addresses</title>
<step>
<para>To list all pools that provide floating IP
addresses:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput></screen>
</step>
</procedure>
<procedure>
<title>To allocate a floating IP address to the current
project</title>
<step>
<para>The output of the following command shows the
freshly allocated IP address:</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-pool-list</userinput></screen>
<para>If more than one pool of IP addresses is available,
you can also specify the pool from which to allocate
the IP address:</para>
<screen><prompt>$</prompt> <userinput>floating-ip-create POOL_NAME</userinput></screen>
</step>
</procedure>
<procedure>
<title>To list floating IP addresses allocated to the current
project</title>
<step>
<para>If an IP is already associated with an instance, the
output also shows the IP for the instance, thefixed IP
address for the instance, and the name of the pool
that provides the floating IP address.</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-list</userinput></screen>
</step>
</procedure>
<procedure>
<title>To release a floating IP address from the current
project</title>
<step>
<para>The IP address is returned to the pool of IP
addresses that are available for all projects. If an
IP address is currently assigned to a running
instance, it is automatically disassociated from the
instance.</para>
<screen><prompt>$</prompt> <userinput>nova floating-ip-delete FLOATING_IP</userinput></screen>
</step>
</procedure>
<procedure>
<title>To assign a floating IP address to an instance</title>
<step>
<para>To associate an IP address with an instance, one or
multiple floating IP addresses must be allocated to
the current project. Check this
with:<screen><prompt>$</prompt> <userinput>nova floating-ip-list</userinput></screen>In
addition, you must know the instance's name (or ID).
To look up the instances that belong to the current
project, use the <code>nova list</code> command.</para>
<screen><prompt>$</prompt> <userinput>nova add-floating-ip INSTANCE_NAME_OR_ID FLOATING_IP</userinput></screen>
<para>After you assign the IP with <command>nova
add-floating-ip</command> and configure security group rules for the instance, the instance is
publicly available at the floating IP
address.
</para>
</step>
</procedure>
<procedure>
<title>To remove a floating IP address from an
instance</title>
<step>
<para>To remove a floating IP address from an instance,
you must specify the same arguments that you used to
assign the IP.</para>
<screen><prompt>$</prompt> <userinput>nova remove-floating-ip INSTANCE_NAME_OR_ID FLOATING_IP</userinput></screen>
</step>
</procedure>
</section>