[Openstack] how to set individual gateway for each VLAN or Tenant network?

Nathanael Burton nathanael.i.burton at gmail.com
Tue Jun 12 16:07:04 UTC 2012


It would probably be a good idea to get the patch made to master for using
dnsmasq tags to customize the dhcp server configuration. Maybe I'll submit
a patch in my down time.

Thanks,

Nate
On Jun 12, 2012 12:03 PM, "Lorin Hochstein" <lorin at nimbisservices.com>
wrote:

> Cool, thanks. I'll try to get this into the docs.
>
> Take care,
>
> Lorin
> --
> Lorin Hochstein
> Lead Architect - Cloud Services
> Nimbis Services, Inc.
> www.nimbisservices.com
>
>
>
>
>
> On Jun 12, 2012, at 11:10 AM, Nathanael Burton wrote:
>
> Lorin, Diego,
>
> I wrote up a pastebin of setting up an example dnsmasq.conf file,
> setting it within nova.conf, patching linux_net.py (in stable/essex),
> and showing the example dhcp leases file which set custom values for
> the router, ntp-server, and dns-server using the dnsmasq conf and tags
> based on the network label field within the network defined within
> nova.  The same process should work with both FlatDHCP or VLANManager.
>
> http://paste.openstack.org/show/18471/
>
> Thanks,
>
> Nate
>
> On Mon, Jun 11, 2012 at 10:17 PM, Lorin Hochstein
> <lorin at nimbisservices.com> wrote:
>
> Hey Nate:
>
>
> On Jun 11, 2012, at 2:17 PM, Nathanael Burton wrote:
>
>
> dnsmasq supports setting parameters such as the gateway IP and other
>
> settings based on tag. I have run a patched version of nova-network in the
>
> Diablo time that used the network DB label field as the network tag in
>
> dnsmasq. This then allows you to set custom configs by modifying the
>
> dnsmasq.conf file. This was done with VLANmanager.
>
>
>
>
> Are you able to share an exampleof a dnsmasq.conf file that uses tags to
>
> handle different config settings per network/VLAN?
>
>
>
> Take care,
>
>
> Lorin
>
> --
>
> Lorin Hochstein
>
> Lead Architect - Cloud Services
>
> Nimbis Services, Inc.
>
> www.nimbisservices.com
>
>
>
>
> Thanks
>
>
> Nate
>
>
> On Jun 11, 2012 2:09 PM, "Lorin Hochstein" <lorin at nimbisservices.com>
> wrote:
>
>
>
> On Jun 4, 2012, at 8:22 PM, romi zhang wrote:
>
>
> Hi,
>
>
> I am using VLAN network mode and will connect eth1 and eth2 of my compute
>
> node to the LAN Switch, and LAN switch will create individual VLAN IP
>
> interface for each Tenant/VLAN and then route to the NAT equipment,through
>
> SNAT/DNAT to touch internet. So, that needs I can set the default gateway
> of
>
> each Tenant VLAN to the different IP address of VLAN interface on the
>
> switch.
>
>
>
> I have the same question, I would love to know if you can set the gateways
>
> in VLAN mode.
>
>
>
> For example, my first tenant(auto0Tenant) is at VLAN200/br200/eth1/fix_ip
>
> range is 192.168.2.0/28 and second(aotu1Tenant) is
>
> VLAN300/br300/eth2/fix_ip_range 192.168.3.0/28, the VLAN interface ip
>
> address for them on switch is 192.168.2.9 and 192.168.3.9, I want to set
> the
>
> default gateway of VMs in auto0Tenant to 192.168.2.9 and 192.168.3.9 for
>
> aotu1Tenant’s VMs.
>
>
> I try to use two methods, the first is to use nova-command:
>
>
> nova-manage network create --label=auto0Tenat
>
> --fixed_range_v4=192.168.2.0/28 --num_networks=1 --gateway=192.168.2.9
>
> --dns1=61.139.2.69 --vlan=200 --bridge=br200 --bridge_interface=eth1
>
> --network_size=16 --multi_host=T
>
> --project_id=5f9281bca6854fe3974a457d81afd78c
>
>
> nova-manage network create --label=aotu1Tenant
>
> --fixed_range_v4=192.168.3.0/28 --num_networks=1 --gateway=192.168.3.9
>
> --dns1=61.139.2.69 --vlan=300 --bridge=br300 --bridge_interface=eth2
>
> --network_size=16 --multi_host=T
>
> --project_id=5f9281bca6854fe3974a457d81afd78c
>
>
> but the result is the newest created VM default gateway is still the IP
>
> address of br200 or br300 by the system, that means the factor of “gateway”
>
> and “dns1” in nova-mange network command did not work.
>
>
> The second way is to use dnsmasq.conf that Vish told me, that I set just
>
> dhcp_option=3,192.168.2.9. Yes it is useful for auto0Tenat VLAN, it can set
>
> auto0Tenant gateway to 192.168.2.9, but how to set others at the same time?
>
>
> Then I tried to use:
>
>
> Interface=vlan200
>
> dhcp_option=3,192.168.2.9
>
>
> Interface=vlan300
>
> dhcp_option=3,192.168.3.9
>
>
>
>
> Does it actually work to specify multiple interfaces in the dnsmasq conf
>
> file like that? I would have thought that the second values would override
>
> the first ones.
>
>
>
> Take care,
>
>
> Lorin
>
> --
>
> Lorin Hochstein
>
> Lead Architect - Cloud Services
>
> Nimbis Services, Inc.
>
> www.nimbisservices.com
>
>
>
>
>
>
> _______________________________________________
>
> Mailing list: https://launchpad.net/~openstack
>
> Post to     : openstack at lists.launchpad.net
>
> Unsubscribe : https://launchpad.net/~openstack
>
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/3cd8153c/attachment.html>


More information about the Openstack mailing list