8.10.4. Defining a Floating IP-Address Pool
By default, each virtual instance is automatically assigned a private IP address in the network to which it is assigned. You may optionally assign public IP addresses to instances.
OpenStack uses the term "floating IP" to refer to an IP address that can be dynamically added to a running virtual instance. In OpenStack Networking, a floating IP pool is represented as an external network and a floating IP is allocated from a subnet associated with the external network.
For this procedure, you must first have installed OpenStack Networking.
To define a pool of floating IP addresses:
Procedure 8.11. Defining a Floating IP-Address Pool Using the Command Line INterface
- Create an external network for the pool:
#neutron net-create networkName --router:external=TrueExample 8.7. Defining an External Network
#neutron net-create ext-net --router:external=True Created a new network: +---------------------------+--------------------------------------+ | Field | Value | +---------------------------+--------------------------------------+ | admin_state_up | True | | id | 3a53e3be-bd0e-4c05-880d-2b11aa618aff | | name | ext-net | | provider:network_type | local | | provider:physical_network | | | provider:segmentation_id | | | router:external | True | | shared | False | | status | ACTIVE | | subnets | | | tenant_id | 6b406408dff14a2ebf6d2cd7418510b2 | +---------------------------+--------------------------------------+ - Create the pool of floating IP addresses:
$neutron subnet-create --allocation-pool start=IPStart,end=IPStart --gateway GatewayIP --disable-dhcp networkName CIDRExample 8.8. Defining a Pool of Floating IP Addresses
$neutron subnet-create --allocation-pool start=10.38.15.128,end=10.38.15.159 --gateway 10.38.15.254 --disable-dhcp ext-net 10.38.15.0/24 Created a new subnet: +------------------+--------------------------------------------------+ | Field | Value | +------------------+--------------------------------------------------+ | allocation_pools | {"start": "10.38.15.128", "end": "10.38.15.159"} | | cidr | 10.38.15.0/24 | | dns_nameservers | | | enable_dhcp | False | | gateway_ip | 10.38.15.254 | | host_routes | | | id | 6a15f954-935c-490f-a1ab-c2a1c1b1529d | | ip_version | 4 | | name | | | network_id | 4ad5e73b-c575-4e32-b581-f9207a22eb09 | | tenant_id | e5be83dc0a474eeb92ad2cda4a5b94d5 | +------------------+--------------------------------------------------+
You have successfully created a pool of floating IP addresses.