On 09/09/13 14:07, Robert Tsai wrote:
Hi Simon,

Thanks for the reply!  Sorry I didn't clarify,  each subnet is on its
own nic on  the dnsmasq server.   The storage subnet is an isolate
non-routed network.  So the storage subnet clients do get a ip from
dhcp but the mac, lease, and hostname never get populated to the
dnsmasq.leases file only the app subnet clients do.  Btw, my current
dnsmasq server is on ver 2.48 on centos6.3.

I understand. If the storage subnet clients get a DHCP lease, but the leases never appear in dnsmasq.leases file, then they may well be getting a DHCP lease from another DHCP server on that network. You really need to check the logs to see if the clients are talking to dnsmasq, or another DHCP server that's there accidentally.

As for dhclient sending host name, is it possible to have, for
example, a subdomin added to the hostname?  I tried to send node.str
but dnmasq ignores anything after node\.  Again really appreciate the
help!


Check the --domain dnsmasq config option - you can associate domains with subnets.


Cheers,

Simon.


Robert



Sent from my iPhone

On Sep 9, 2013, at 3:33 AM, Simon Kelley<si...@thekelleys.org.uk>
wrote:

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@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


_______________________________________________ Dnsmasq-discuss
mailing list Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to