Ask Your Question

Adding multiple subnets to external network

asked 2015-10-16 13:35:07 -0500

Diplomat gravatar image


So I tried adding 2 x /29 with different gateways to my external network, but for some reason I'm not able to set second subnet's gateway as the gateway IP and because of that VM with an IP from that subnet can't connect to the internet?

So I guess that's the issue, but I have no idea how can I set up a gateway for my second network. When I added it:

neutron subnet-create ext-net --name ext-subnet \
  --allocation-pool, \
  --disable-dhcp --gateway

Then I assumed it will create a "network:router_gateway", but it didn't.

So please help me out, I don't know how to proceed.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-16 14:12:00 -0500

mpetason gravatar image

You need to create the external network first, then add subnets to it. The "ext-net" should reference the external network you created, so if it was PUBLIC_NETWORK it would look something like:

neutron subnet-create PUBLIC_NETWORK --name ext-subnet1 --allocation-pool, --disable-dhcp --gateway

Say you wanted to add a second one:

neutron subnet-create PUBLIC_NETWORK --name ext-subnet2 --allocation-pool, --disable-dhcp --gateway

edit flag offensive delete link more


Hello! That's what I did, I created the external network first and then added the first subnet. Now I added another subnet the same way as I added the first one, but it appears it doesn't want to work.

Diplomat gravatar imageDiplomat ( 2015-10-16 14:14:37 -0500 )edit

Please check this image too:

Diplomat gravatar imageDiplomat ( 2015-10-16 14:16:39 -0500 )edit

You may want to think about your use case instead. You won't want to put these directly on the internet, if they are publicly accessible. You should be installing this all within a closed off environment then look at using NAT to apply Internet Routable to Floating IP.

mpetason gravatar imagempetason ( 2015-10-16 14:24:30 -0500 )edit

I see the issue though, you are only able to set one gateway, but you have two networks. From the instances are you able to ping the default gateway? You may need a next hop setup to go to the first network, or configure custom routes with DHCP within the private networks.

mpetason gravatar imagempetason ( 2015-10-16 14:25:51 -0500 )edit

Yes, I'm able to ping the gateway from the VM.

Diplomat gravatar imageDiplomat ( 2015-10-16 15:21:23 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-10-16 13:35:07 -0500

Seen: 1,595 times

Last updated: Oct 16 '15