Ask Your Question
0

Neutron takes multiple IPs from allocation pool?

asked 2015-10-28 06:52:06 -0500

Openstackuser2013 gravatar image

updated 2015-10-29 01:22:20 -0500

I am testing Liberty on Ubuntu 14.04 using limited pool of IP addresses.

I created public network with this command:

neutron subnet-create public 10.0.0.0/24 --name public   --allocation-pool start=10.0.0.131,end=10.0.0.132   --gateway 10.0.0.1

I expected that the virtual router would take the first free IP address and second adress in the pool would be left for an instance. But for some reason virtual router took the IP of 10.10.10.132. The lower IP was taken by something else.

When checking the Neutron ports I find this port occupied by following:

user@liberty:~$ neutron port-show <port-id>
+-----------------------+-----------------------------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                                           |
+-----------------------+-----------------------------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                                            |
| allowed_address_pairs |                                                                                                                 |
| binding:host_id       | liberty                                                                                                         |
| binding:profile       | {}                                                                                                              |
| binding:vif_details   | {"port_filter": true}                                                                                           |
| binding:vif_type      | bridge                                                                                                          |
| binding:vnic_type     | normal                                                                                                          |
| device_id             | dhcpa01befa0-d7d2-5f17-8b2b-284d077d8452-b3bae97e-7461-4f9c-9484-700d0e1d8f79                                   |
| device_owner          | network:dhcp                                                                                                    |
| dns_assignment        | {"hostname": "host-10-0-0-131", "ip_address": "10.0.0.131", "fqdn": "host-10-0-0-131.openstacklocal."} |
| dns_name              |                                                                                                                 |
| extra_dhcp_opts       |                                                                                                                 |
| fixed_ips             | {"subnet_id": "d9eb7061-29d6-4353-8732-ac1c9866b3ee", "ip_address": "10.0.0.131"}                            |
| id                    | bc541362-fb30-40d3-8da8-b1c126de5309                                                                            |
| mac_address           | fa:16:3f:d4:11:6d                                                                                               |
| name                  |                                                                                                                 |
| network_id            | b3bae97e-7461-4f9c-9484-700d0e1d8f79                                                                            |
| port_security_enabled | False                                                                                                           |
| security_groups       |                                                                                                                 |
| status                | ACTIVE                                                                                                          |
| tenant_id             | f0a63ad702da4880a991fadea2cacca6                                                                                |
+-----------------------+-----------------------------------------------------------------------------------------------------------------+

At this point I don't have any instances using floating IPs.

Why is this IP owned by network:dhcp? Is there a way avoid wasting second IP from allocation pool like this?

In the earlier versions of Openstack I have used the virtual router IP was only one that was taken from the allocation pool.

EDIT: The private 10.0.0.x addresses are just example. In reality those would be public addresses.

EDIT2: Fixed typing erros in IP addresses.

edit retag flag offensive close merge delete

Comments

1

There is no need for dhcp on a subnet for floating ips. So use --disable-dhcp when creating it.

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-10-28 14:18:02 -0500 )edit

Thanks. This solved my problem.

Openstackuser2013 gravatar imageOpenstackuser2013 ( 2015-10-29 01:30:46 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-10-28 07:42:57 -0500

dbaxps gravatar image

updated 2015-10-28 08:44:44 -0500

You wrote

neutron subnet-create public 10.0.0.0/24 --name public   --allocation-pool start=10.0.0.131,end=10.10.10.132   --gateway 10.0.0.1

As far as I understand CIDR 10.0.0.0/24 all available range is 10.0.0.0,...,10.0.0.254. Broadcast 10.0.0.255.

edit flag offensive delete link more

Comments

Yes. The network spans from 10.0.0.0.1 to 10.0.0.254. Because many addresses of the network are already in use I must use a smaller area for IPs of Openstack and VMs. The problem is it that now Neutron seems to be taking 2 addresses instead of 1.

Openstackuser2013 gravatar imageOpenstackuser2013 ( 2015-10-28 07:50:34 -0500 )edit

What is "end=10.10.10.132" ? it is from 10.0.0.0/8.

dbaxps gravatar imagedbaxps ( 2015-10-28 08:47:07 -0500 )edit

Just me being stupid idiot who can't write even the simplest thing without typing it wrong. Fixed it now.

Openstackuser2013 gravatar imageOpenstackuser2013 ( 2015-10-29 01:21:40 -0500 )edit

I had Chinese friend , he often told :- Community is strength

dbaxps gravatar imagedbaxps ( 2015-10-29 01:26:31 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-10-28 06:52:06 -0500

Seen: 892 times

Last updated: Oct 29 '15