On Sun, Feb 1, 2015 at 6:05 AM, Simon Kelley <si...@thekelleys.org.uk> wrote:
> I just checked in code which supports > > - --dhcp-hostsdir (as before) but also > > - --dhcp-optsdir > - --hostsdir > > to allow automatic reads of new DHCP options, and host IP addresses > (like /etc/hosts) > > That should be what you need, if I understood right. > > Thanks Simon! But I am afraid it doesn't work as your expected. I rebuilt the dnsmasq from latest upstream and moved all VMs' config files into folders. When I create new VM, the VM can't get IP address through dhclient. >From dnsmasq.log, it said: Feb 2 16:00:24 dnsmasq-dhcp[1661]: DHCPDISCOVER(eth2) fa:15:24:50:50:00 no address available Then after I kill the dnsmasq process and restart it by: `pkill dnsmasq; dnsmasq`, I redo the dhclient eth0 in VM. The VM can get the IP Address successfully. The dnsmasq.log looks like: Feb 2 16:01:51 dnsmasq[1661]: exiting on receipt of SIGTERM Feb 2 16:01:55 dnsmasq[1727]: started, version 2.73test5-8-g1062667 cachesize 150 Feb 2 16:01:55 dnsmasq[1727]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify Feb 2 16:01:55 dnsmasq-dhcp[1727]: DHCP, static leases only on 10.11.0.1, lease time 1h Feb 2 16:01:55 dnsmasq[1727]: reading /etc/resolv.conf Feb 2 16:01:55 dnsmasq[1727]: using nameserver 10.0.101.1#53 Feb 2 16:01:55 dnsmasq[1727]: read /etc/hosts.dnss/fa:e1:c4:ea:eb:00 - 1 addresses Feb 2 16:01:55 dnsmasq[1727]: read /etc/hosts.dnss/fa:15:24:50:50:00 - 1 addresses Feb 2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.dhcps//fa:e1:c4:ea:eb:00 Feb 2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.dhcps//fa:15:24:50:50:00 Feb 2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.options//fa:e1:c4:ea:eb:00 Feb 2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.options//fa:15:24:50:50:00 Feb 2 16:02:08 dnsmasq-dhcp[1727]: DHCPDISCOVER(eth2) 192.168.122.40 fa:15:24:50:50:00 Feb 2 16:02:08 dnsmasq-dhcp[1727]: DHCPOFFER(eth2) 10.11.50.91 fa:15:24:50:50:00 Feb 2 16:02:08 dnsmasq-dhcp[1727]: DHCPREQUEST(eth2) 10.11.50.91 fa:15:24:50:50:00 Feb 2 16:02:08 dnsmasq-dhcp[1727]: Ignoring domain test.org for DHCP host name 10-11-50-91 Feb 2 16:02:08 dnsmasq-dhcp[1727]: DHCPACK(eth2) 10.11.50.91 fa:15:24:50:50:00 10-11-50-91 What wrong is it? -- Yongkang You
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss