[Dnsmasq-discuss] Dnsmasq dns/dhcp with multiple subnet - lease file issue

Simon Kelley simon at thekelleys.org.uk
Mon Sep 9 11:33:08 BST 2013


On 08/09/13 14:09, Robert Tsai wrote:
>
> Hi,
>
> I am having issues with dnsmasq with dns/dhcp with multple subnets. I
> have two subnets , one named app and the other storage.  Both subnet
> clients get ips through dhcp but only the app subnet client's lease
> gets propagated to /var/lib/dnsmasq.leases.  The storage subnet
> client's lease never gets written to that file.

I'm assuming that both subnets are on the same physical network adapator.

A client (as identified by MAC address) can't have two leases at once. 
My guess is that the first lease achieved is on the storage subnet, and 
that gets deleted when the same client gets another lease. It's worth 
looking in the system log to see what happening, and also worth setting 
--log-dhcp to get more information there.

One way around this is to configure the DHCP clients to send different 
client-IDs for the two subnets, they'll be treated as two different 
leases for two different clients.

   Also if I have a
> client server that needs to have both subnets and sends its host-name
> from dhclient, will dnsmasq add both host-name to the lease file? Any
> help on this would be appreciated.  Below are the options that are
> set for dhcp and dns.
>

No. A hostname is only ever associated with one DHCP lease.


Cheers,

Simon.

> Thanks, Robert
>
> addn-hosts=/etc/dnsmasq.d/dhcp_qa_hosts bogus-priv
> domain=app.domain.net,10.10.123.201,10.10.123.240
> domain=str.domain.net,10.10.133.201,10.10.133.240 domain-needed
> expand-hosts log-dhcp
>
> log-queries dhcp-option=option:dns-server,10.10.123.5
> dhcp-range=app,10.10.123.201,10.10.123.240,12h,app.domain.net
> dhcp-option=net:app,121,10.10.120.0/24,10.10.123.241,10.10.121.0/24,10.10.123.241
>
>
dhcp-range=storage,10.10.133.201,10.10.133.240,12h,str.domain.net
> dhcp-option=net:storage,3
> dhcp-option=net:storage,121,10.10.130.0/24,10.10.133.241
> dhcp-option=net:app,option:router,10.10.123.
>
>
>
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




More information about the Dnsmasq-discuss mailing list