Ask Your Question

How to delete a subnet in neutron?

asked 2014-11-21 06:33:39 -0500

sanderv gravatar image

I'm setting up my cloud, based on Juno, and I'm following the setup guides on . I have just added a subnet, but after adding it realise that it has wrong IP addresses. The subnet is displayed with neutron subnet-list:

[root@controller ~]# neutron subnet-list
| id                                   | name        | cidr           | allocation_pools                                   |
| bb384bc5-1df7-470d-86ca-9f4fd5cad3a1 | ext-subnet  | | {"start": "", "end": ""} |
| 0d762f12-d158-474c-8c59-1509c4d9318b | demo-subnet | | {"start": "", "end": ""}

Now I would like to remove the subnet and create it again with the correct IP addressing, but I'm getting a HTTP 409:

[root@controller ~]# neutron subnet-delete bb384bc5-1df7-470d-86ca-9f4fd5cad3a1
Conflict (HTTP 409) (Request-ID: req-80a96f97-4bad-4384-a782-a3a7f668fa12)

What am I missing?

Thanks, Sander

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted

answered 2015-09-19 12:09:43 -0500

Marknikel gravatar image
  1. neutron router-gateway-clear "Router"(check name with neutron router-list)
  2. neutron router-interface-delete "Router" "SubNet"
  3. neutron router-delete "Router"
  4. neutron subnet-delete "SubNet"
  5. neutron net-delete "Net"
edit flag offensive delete link more

answered 2014-11-21 12:58:29 -0500

Amitabh Sinha gravatar image

updated 2014-11-21 12:59:16 -0500

First remove the allocated floating IP . use command floatingip-delete IP after that delete PORT using port-delete portid .After deleting port you can be able to delete subnet easily

edit flag offensive delete link more

answered 2015-11-22 21:54:28 -0500

Bipin gravatar image


Looks like you are having an orphan port.

neutron port-list

Then remove the port using neutron port-delete <port id>

After that remove the subnet using

neutron subnet-delete <subnet id>

Your issue is related to this review

edit flag offensive delete link more

answered 2014-11-21 10:45:59 -0500

dbaxps gravatar image

updated 2014-11-21 11:02:10 -0500

Delete Subnet
This operation remove a subnet from a Neutron network. The operation will fail if IPs from the subnet being removed are still allocated.
409 Conflict 

Delete Network
This operation will remove a Neutron network, and all its associated subnets, provided that no port is currently configured on the network. If ports are still configured on the network being removed, a 409 error will be returned.
edit flag offensive delete link more


Check floating IPs still allocated from subnet , login to corresponding tenant :
Access & Security => Floating IPs => Release Floating IPs

dbaxps gravatar imagedbaxps ( 2014-11-21 11:10:32 -0500 )edit

I would also check whether external net itself was activated as gateway for some router and cleaned this gateway up. Then neutron net-delete will remove subnet as well.

dbaxps gravatar imagedbaxps ( 2014-11-21 11:16:32 -0500 )edit

Mail system seems to be down. Track thread itself.

dbaxps gravatar imagedbaxps ( 2014-11-21 11:18:25 -0500 )edit

Hi! Do you know how to get the response code, i.e. "409" in this case? Thanks.

MrQ gravatar imageMrQ ( 2017-08-09 15:41:07 -0500 )edit

answered 2017-07-20 23:36:46 -0500

mourya007 gravatar image

Hi this is the simple and confusing situation but you have to follow some steps and hope it will work :

neutron router-list

neutron router-show <router-id>

neutron router-gateway-clear <router-id>

Check for the attached ports to the router. If there are attached ports, clear them first.

neutron router-port-list <router-id>

neutron router-interface-delete <router-id> <subnet-id>

neutron router-delete <router-id>

neutron subnet-list

neutron subnet-show <subnet-id>

neutron subnet-delete <subnet-id>

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-11-21 06:33:39 -0500

Seen: 29,598 times

Last updated: Jul 20 '17