[Dnsmasq-discuss] Can I serve two different DHCP domains from a single dnsmasq server?

richardvoigt at gmail.com richardvoigt at gmail.com
Thu Aug 5 19:00:10 BST 2010


What version of dnsmasq are you using?

Your dhcp-host entries have their fields in all the wrong order.

Try
dhcp-host=02:00:0A:00:10:00,192.168.1.1,bar

Also, bar-range on the beginning of a dhcp-range line is incorrect.  It
should be tag:bar-range (in current versions of dnsmasq), but is not
actually necessary since the dhcp-host line controls the issued IP.


On Thu, Aug 5, 2010 at 11:15 AM, Alberto Cuesta-Canada <
alberto.cuesta at excelian.com> wrote:

>  Hi Santiago,
>
> I've indeed tested it extensively before posting, at least as much as I can
> without disturbing the production environments around.
>
> With the configuration below, and ensuring that there were no leases around
> to mess up anything, the machine in the bar domain would instead get a
> random ip in the foo domain, no hostname, and foo dns domain.
>
> On Sunday, when production is stopped, I can swap the order of the domain
> lines to see if dnsmasq recognises only the first, and do other more
> dangerous tests.
>
> Regards,
>
>   *Alberto Cuesta-Canada*
> GaaS Team Lead
> Excelian Ltd.
> +44 (0) 7942633361
>
> ------------------------------
> *From:* santiago.j.zarate at gmail.com on behalf of Santiago Zarate
> *Sent:* Thu 05/08/2010 15:56
> *To:* Alberto Cuesta-Canada
> *Cc:* dnsmasq-discuss at lists.thekelleys.org.uk
> *Subject:* Re: [Dnsmasq-discuss] Can I serve two different DHCP domains
> from a single dnsmasq server?
>
>  if i'm not mistaken, this is possible... but its matter of begin
> testing...
>
>
>
> 2010/8/5 Alberto Cuesta-Canada <alberto.cuesta at excelian.com>:
> > Hi all,
> >
> > does anyone know if it is possible to send via DHCP hostnames in two
> different domains from a single dnsmasq server?
> >
> > It should be something like:
> >
> > domain=foo,192.168.0.0/24
> > domain=bar,192.168.1.0/24
> >
> > dhcp-range=foo-range,192.168.0.0,192.168.0.255,infinite
> > dhcp-range=bar-range,192.168.1.0,192.168.1.255,infinite
> >
> > dhcp-host=02:00:0A:00:00:00,net:foo-range,host1,192.168.0.1,static
> > dhcp-host=02:00:0A:00:10:00,net:bar-range,host2,192.168.1.1,static
> >
> > So what I would have is that host1 would get the fqdn host1.foo and the
> 192.168.0.1 address, while host2 would be host2.bar and get the 192.168.1.1
> address.
> >
> > Many thanks,
> >
> > Alberto Cuesta-Canada
> > GaaS Team Lead
> > Excelian Ltd.
> > +44 (0) 7942633361
> >
> > ________________________________
> >
> > Date: Wed, 04 Aug 2010 20:02:07 -0700
> > From: Paul Chambers <dnsmasq at lists.bod.org>
> > Subject: [Dnsmasq-discuss] wildcard subdomains for a DHCP-assigned
> >        host
> > To: Dnsmasq List <dnsmasq-discuss at lists.thekelleys.org.uk>
> > Message-ID: <4C5A29AF.9050802 at lists.bod.org>
> > Content-Type: text/plain; charset=UTF-8; format=flowed
> >
> >  This may be a dumb question, but I'm no wiser after skimming the man
> > page and experimenting a little...
> >
> > I have a development box I'm using to develop some virtual host stuff.
> > I'd like to set up a wildcard subdomain for it. Essentially
> > <anything>.dev.foo.bar would resolve to dev.foo.bar's IP address
> > (assigned by DHCP). Its IP address does move on occasion, just often
> > enough to be irritating/fragile to use an IP directly.
> >
> > For now, I've worked around it by adding 'address=/dev.foo.bar/<current
> > IP addr>' to the config, but that's fragile and seems like a bad idea. I
> > could give the box a static IP I suppose, but I much prefer keeping the
> > number of static assignments to a minimum. Plus it's a laptop, so I'd
> > keep it configured for DHCP and set up a static DHCP assignment based on
> > MAC address. Somehow none of this feels very satisfying, just
> workarounds.
> >
> > Is there a better way I've missed? If not, is there a reason dnsmasq
> > doesn't do this? would it be hard to add? (perhaps support wildcards for
> > cname?)
> >
> > -- Paul
> >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
> >
> > End of Dnsmasq-discuss Digest, Vol 63, Issue 4
> > **********************************************
> >
> >
> > The information contained in this email and any attached files are
> confidential and intended solely for the addressee(s). The email may be
> legally privileged or prohibited from disclosure and unauthorised use. If
> you are not the named addressee you may not use, copy, or disclose this
> information to any other person. If you received this message in error
> please notify the sender immediately and delete it from your system.
> >
> > Any opinion or views contained in this email message are those of the
> sender, and do not represent those of the Company in any way and reliance
> should not be placed upon its contents. Unless otherwise stated, this email
> message is not intended to be contractually binding. Where an Agreement
> exists between our respective companies and there is conflict between the
> contents of this email message and the Agreement then the terms of that
> Agreement shall prevail.
> >
> > Excelian
> > 50 Featherstone Street
> > London
> > EC1Y 8RT
> > Tel: +44 (0) 20 7336 9595
> > Fax: +44 (0) 20 7336 9596
> > www.Excelian.com
> > _____________________________________________________________________
> > This e-mail has been scanned for viruses by MessageLabs. For further
> information visit http://www.messagelabs.com
> >
> > Excelian subscribes to cleaner and greener methods of working. Help take
> responsibility for the environment. Please don't print this email unless you
> absolutely have to.
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
> >
>
> The information contained in this email and any attached files are
> confidential and intended solely for the addressee(s). The email may be
> legally privileged or prohibited from disclosure and unauthorised use. If
> you are not the named addressee you may not use, copy, or disclose this
> information to any other person. If you received this message in error
> please notify the sender immediately and delete it from your system.
>
> Any opinion or views contained in this email message are those of the
> sender, and do not represent those of the Company in any way and reliance
> should not be placed upon its contents. Unless otherwise stated, this email
> message is not intended to be contractually binding. Where an Agreement
> exists between our respective companies and there is conflict between the
> contents of this email message and the Agreement then the terms of that
> Agreement shall prevail.
>
> Excelian
> 50 Featherstone Street
> London
> EC1Y 8RT
> Tel: +44 (0) 20 7336 9595
> Fax: +44 (0) 20 7336 9596
> www.Excelian.com
> _____________________________________________________________________
> This e-mail has been scanned for viruses by MessageLabs. For further
> information visit http://www.messagelabs.com
>
> Excelian subscribes to cleaner and greener methods of working. Help take
> responsibility for the environment. Please don't print this email unless you
> absolutely have to.
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20100805/9d039fc5/attachment.htm 


More information about the Dnsmasq-discuss mailing list