Extending external subnet (change CIDR)?

asked 2016-04-05 05:23:10 -0600

declan.mcnulty gravatar image

Hello, When creating our OpenStack environment a year or so ago, we mistakenly allocated only a 24-bit subnet ( for external floating IP addresses. I'd now like to extend it to We're using Kilo, running on Centos 7.1

neutron subnet-list shows this:

| id                                   | name                | cidr                     | allocation_pools 
| 70457db9-c28c-4e05-baa9-ed6b9f1f2d74 | ext-subnet          |           | {"start": "", "end": ""}

Can I use the following?

neutron subnet-update ext-subnet --allocation-pool start=,end= --gateway

I'm not sure about it because the update-subnet command help doesn't mention allowing a CIDR argument, like the subnet-create command does. Ideally I'd like to avoid deleting the subnet and recreating it with the new CIDR because I imagine that will break all the existing floating address associations in place - but maybe I'm wrong about that. It would be brilliant if somebody could confirm it for me or give any advice for how best to achieve my goal.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-05-30 06:24:06 -0600

Depa77 gravatar image

Hi, I've had to do a similar thing in my Liberty installation, so I don't know if this can be applied to Kilo too. I haven't found any command to change the CIDR of a network, so I edited manually on the database (neutron db, on the table subnets, column cidr) and then changed the allocation pool on the table ipallocationpools. Finally, restart the l3 agent service on every node it is active.

I know that working directly on the DB is not a best-practice, but that was the only way I found to achieve network expansion.

edit flag offensive delete link more



There's a good step-by-step guide to achieving this here: https://cloudblog.switch.ch/2015/09/2... - not that I have tried it; caution is very much advised!!

sxc731 gravatar imagesxc731 ( 2016-09-04 16:38:29 -0600 )edit

answered 2016-05-30 07:23:21 -0600

bjolo gravatar image


We had a similar issue on our MOS 7.0 installation. Also created the cloud with to small of range for floating IPs, and from what i understand you cannot add another external network in MOS Fuel.

This is kinda of a hack but it worked. On your external network, you can add another subnet range. i.e 1 external network, but with 2 subnet ranges. For this to work you have to configure a secondary IP/GW on your external switch. i.e. the vlan on external switch have 2 GW IPs configured. and

The result is 2x /24 instead of 1x /23 so you loose a few IPs on it, but we found no other way to get it done :(

root@node-26:~# neutron net-show net04_ext -f shell | grep subnets


root@node-26:~# neutron subnet-show 528702cb-11ca-4ec2-87e8-d2785415f7f9 -f shell

allocation_pools="{\"start\": \"\", \"end\": \"\"}




root@node-26:~# neutron subnet-show 7e906c00-c75f-406a-9c63-ecfc7bdf9f3e -f shell

allocation_pools="{\"start\": \"\", \"end\": \"\"}"




edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-05 05:23:10 -0600

Seen: 4,545 times

Last updated: May 30 '16