Ask Your Question

Revision history [back]

Forced to use answer field due to formatting options.
What doesn't satisfy you here ? That is schema using neutron :-

$ nova boot --flavor 2 --key_name oskey1 --image \
    fa7a83d1-3ddb-4c0e-9c07-839b6b00f8ca cirr-guest1

  $ nova list
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks     |
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | acfbd460-d8d7-4eba-962b-de6f2f50db12 | cirr-guest1 | ACTIVE | None       | Running     | int=30.0.0.2 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------+


Create and allocate Floating IP addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Source the user's credentials (tenant will be 'ostenant')

  $ . keystonerc_boris

List the ports 

 $ neutron port-list --device-id acfbd460-d8d7-4eba-962b-de6f2f50db12
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
 | id                                   | name | mac_address       | fixed_ips                                                                       |
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
 | 4ecfe633-dbab-4660-a51c-78ea6dbcc149 |      | fa:16:3e:88:05:e0 | {"subnet_id": "04b95f13-cc77-4f9a-8206-7f6ed183461d", "ip_address": "30.0.0.2"} |
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

Create a floating IP

  $ neutron floatingip-create ext
  Created a new floatingip:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | fixed_ip_address    |                                      |
  | floating_ip_address | 192.168.122.11                       |
  | floating_network_id | 12e4de23-34f8-4f9f-ba2b-810c36f3cc40 |
  | id                  | 5976f269-bca2-4c44-8860-7d493909568f |
  | port_id             |                                      |
  | router_id           |                                      |
  | tenant_id           | 2c845a6ad20e45ccb0b045cee27a9661     |
  +---------------------+--------------------------------------+

  It can be noticed (by running 'keystone tenant-list') , the above
  tenant_id corresponds to 'ostenant')

List the floating IP

  $ neutron floatingip-list
  +--------------------------------------+------------------+---------------------+---------+
  | id                                   | fixed_ip_address | floating_ip_address | port_id |
  +--------------------------------------+------------------+---------------------+---------+
  | 5976f269-bca2-4c44-8860-7d493909568f |                  | 192.168.122.11      |         |
  +--------------------------------------+------------------+---------------------+---------+

Associate floating IP with the port of the VM

  $ neutron floatingip-associate 5976f269-bca2-4c44-8860-7d493909568f 4ecfe633-dbab-4660-a51c-78ea6dbcc149
  Associated floatingip 5976f269-bca2-4c44-8860-7d493909568f

Show the floating IP

  $ neutron floatingip-show 5976f269-bca2-4c44-8860-7d493909568f
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | fixed_ip_address    | 30.0.0.2                             |
  | floating_ip_address | 192.168.122.11                       |
  | floating_network_id | 12e4de23-34f8-4f9f-ba2b-810c36f3cc40 |
  | id                  | 5976f269-bca2-4c44-8860-7d493909568f |
  | port_id             | 4ecfe633-dbab-4660-a51c-78ea6dbcc149 |
  | router_id           | d72adddf-4c02-4916-ae6d-16bfdaf59d99 |
  | tenant_id           | 2c845a6ad20e45ccb0b045cee27a9661     |
  +---------------------+--------------------------------------+

Forced to use answer field due to formatting options.
What doesn't satisfy you here ? That is schema using neutron :-

$ nova boot --flavor 2 --key_name oskey1 --image \
    fa7a83d1-3ddb-4c0e-9c07-839b6b00f8ca cirr-guest1

  $ nova list
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks     |
  +--------------------------------------+-------------+--------+------------+-------------+--------------+
  | acfbd460-d8d7-4eba-962b-de6f2f50db12 | cirr-guest1 | ACTIVE | None       | Running     | int=30.0.0.2 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------+


Create and allocate Floating IP addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Source the user's credentials (tenant will be 'ostenant')

  $ . keystonerc_boris

List the ports 

 $ neutron port-list --device-id acfbd460-d8d7-4eba-962b-de6f2f50db12
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
 | id                                   | name | mac_address       | fixed_ips                                                                       |
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
 | 4ecfe633-dbab-4660-a51c-78ea6dbcc149 |      | fa:16:3e:88:05:e0 | {"subnet_id": "04b95f13-cc77-4f9a-8206-7f6ed183461d", "ip_address": "30.0.0.2"} |
 +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

Create a floating IP

  $ neutron floatingip-create ext
  Created a new floatingip:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | fixed_ip_address    |                                      |
  | floating_ip_address | 192.168.122.11                       |
  | floating_network_id | 12e4de23-34f8-4f9f-ba2b-810c36f3cc40 |
  | id                  | 5976f269-bca2-4c44-8860-7d493909568f |
  | port_id             |                                      |
  | router_id           |                                      |
  | tenant_id           | 2c845a6ad20e45ccb0b045cee27a9661     |
  +---------------------+--------------------------------------+

  It can be noticed (by running 'keystone tenant-list') , the above
  tenant_id corresponds to 'ostenant')

 List the floating IP

  $ neutron floatingip-list
  +--------------------------------------+------------------+---------------------+---------+
  | id                                   | fixed_ip_address | floating_ip_address | port_id |
  +--------------------------------------+------------------+---------------------+---------+
  | 5976f269-bca2-4c44-8860-7d493909568f |                  | 192.168.122.11      |         |
  +--------------------------------------+------------------+---------------------+---------+

Associate floating IP with the port of the VM

  $ neutron floatingip-associate 5976f269-bca2-4c44-8860-7d493909568f 4ecfe633-dbab-4660-a51c-78ea6dbcc149
  Associated floatingip 5976f269-bca2-4c44-8860-7d493909568f

Show the floating IP

  $ neutron floatingip-show 5976f269-bca2-4c44-8860-7d493909568f
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | fixed_ip_address    | 30.0.0.2                             |
  | floating_ip_address | 192.168.122.11                       |
  | floating_network_id | 12e4de23-34f8-4f9f-ba2b-810c36f3cc40 |
  | id                  | 5976f269-bca2-4c44-8860-7d493909568f |
  | port_id             | 4ecfe633-dbab-4660-a51c-78ea6dbcc149 |
  | router_id           | d72adddf-4c02-4916-ae6d-16bfdaf59d99 |
  | tenant_id           | 2c845a6ad20e45ccb0b045cee27a9661     |
  +---------------------+--------------------------------------+