Ask Your Question

External network default gateway different with subnet CIDR

asked 2014-06-20 08:20:02 -0500

HoangDo gravatar image

updated 2014-06-20 08:26:16 -0500

Hi guys,

I'm a novice in networking, I hope guys can help me.

I'm setting neutron external network. I followed guideline: create external net, external subnet, set router gateway, set router interface to local net. All is ok.

But my problem is that due to my (stupid) service providers:

  • I bought a block of public IP (to use as floating IP in neutron).

  • Those IPs have different CIDR than the Network node:

Due to their guideline, if I want to create a VM on the host, give VM one IP from the block, but set default gateway = default gateway of host machine. So basically, inside VM, default gateway has different CIDR than the IP.

I know they can do that by skipping ARP protocol by hard set IP-MAC address on the router. The VM's (virtual) interface must have the MAC address corresponding to the IP.

In case of OpenStack, thing is complicated, because it use a SNAT at router. I tried to create external net with the range = , and set default gateway is the same as network node: , but it didn't work:

sudo ip netns exec qrouter-d1ceaf19-4cf0-4334-9f96-7601c70cbf4a route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 qg-8b79f67e-cb   U     0      0        0 qr-d4f642e6-22

You can see they missed default entry for gateway. I tried to add it manually, but I got error message. Seems like linux doesn't allows configure routing like that. I stuck now. Do you have any idea to deploy in this case?

edit retag flag offensive close merge delete


Have you managed to solve your problem?

daghemo gravatar imagedaghemo ( 2015-07-03 07:24:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-20 12:37:05 -0500

atze.devries gravatar image

For the you have to have some form routing. It should be a subnet containing your CIDR. It could be your provider supplies you with this. Otherwise you should set up one yourself. This subnet should have a gateway.

In openstack you can create a exteranl subnet. The CIDR of the subnet should contain your gateway. You can configure a allocation pool. This pool should match (don't forget to disable dhcp in this subnet).

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-20 08:20:02 -0500

Seen: 3,044 times

Last updated: Jun 20 '14