# Can nova-networking be used with an external gateway?

Our OpenStack Installation has one controller node and four compute nodes, each node is depoyed on a server blade. We use nova-networking and each of the compute nodes has two network interfaces defined: one for the physical node and the compute services and one to be used for virtual machines.

The virtual machines have their own subnet x.x.191.x while the physical server blades have ip-addresses from x.x.190.50-x.x.190.54. The tricky part is that we'd like the virtual machines to use the same gateway as the physical server blades. So they should use x.x.190.1 as a gateway instead of the default x.x.191.1.

We tried to achieve that by using the following statement to create the network:

nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 x.x.190.0/23 --fixed-cidr=x.x.191.0/24 --gateway=x.x.190.1 --dns1=8.8.8.8 --dns2=8.8.4.4


But the virtual machines still use x.x.191.1 as gateway with a 255.255.255.0 netmask.

Is it even possible to define an external gateway with nova-networking?

edit retag close merge delete

Sort by » oldest newest most voted

You are currently using this as a network:

x.x.191.0/24


Your gateway is in the 190 network:

x.x.190.1


Since you are using a /24 the network you created cannot reach the gateway you are specifying. You have to specify a gateway within the network you are using. 191 only has addresses from 191.0-255, it cannot reach 190.1. You are missing a hop between 191.1 and 190.1.

You're going to have to change your CIDR notation to include the other network, or just use 190 as the network and setup DHCP ranges so that you are starting at 190.20 for instances.

more

Thanks for your answer. I read about DHCP ranges, but I didn't find the concrete way how to setup DHCP ranges for an OpenStack network. Is there a way to define them in nova.conf, or where else can I define them?

( 2014-10-15 06:31:28 -0600 )edit

So you are using Nova Network and I didn't see as much useful information about setting ranges. You should be able to setup lease reservations on your DHCP server if you are pulling it from a box or a switch.

( 2014-10-15 09:55:17 -0600 )edit

Maybe add 191.1 as a gateway on the switch, configure the necessary routing between networks, and have the first hop be 191.1 which has a default next hop of 190.1.

( 2014-10-15 10:06:08 -0600 )edit