Update floating ip pool range

asked 2015-05-13 13:44:22 -0600

capzulu gravatar image

I need to add more floating IPs to the external network pool, but I don't want to mess with the already allocated floating IPs.

It's possible to add more floating IPs to the external network pool without deleting it or deallocate the already allocated floating IPs?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-05-13 14:50:54 -0600

updated 2015-05-13 15:13:23 -0600

To add (192.169.142.120 - 192.169.142.130) to already existing pool for subnet external (192.169.142.0/24):

# . keystonerc_admin
# neutron subnet-update external --allocation-pools start=192.169.142.120,end=192.169.142.130

in case 192.169.142.0/25 only :-

# neutron subnet-update external --allocation-pools start=192.169.142.120,end=192.169.142.126

Per http://samos-it.com/posts/neutron-mul...
Via Neutron API:-

import logging
from neutronclient.neutron import client

auth_url = "http://192.168.33.11:5000/v2.0"

logging.basicConfig(level=logging.DEBUG)
neutron = client.Client('2.0', username="admin", password="password", tenant_name="admin", auth_url=auth_url)

print "".join(neutron.list_subnets())

req = {"subnet": {"allocation_pools": [{"start": "10.0.2.3", "end": "10.0.2.15"}, {"start": "10.0.2.17", "end": "10.0.2.17"}, {"start": "10.0.2.19", "end": "10.0.2.254"}]}}

neutron.update_subnet("d5d48930-7bfb-4f0c-8968-13f8af785868", req)
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-05-13 13:44:22 -0600

Seen: 940 times

Last updated: May 13 '15