[Dnsmasq-discuss] question about --dhcp-hostsfile

Simon Kelley simon at thekelleys.org.uk
Fri Jul 6 21:53:04 BST 2012


On 06/07/12 21:26, Shashank Shanbhag wrote:
> Thanks for your prompt reply, Simon and Harish.
>
> I used the exact format suggested (mac,ip,lease).
>
> Additionally, I see this in the logs when dnsmasq starts,
> dnsmasq[16686]: cannot read /var/run/_root_root_vdhcpd200.dhcp_hosts.cfg:
> Permission denied
> dnsmasq[16686]: read /var/run/_root_root_vdhcpd200.dhcp_hosts.cfg
>
> That is a bit confusing. I made sure the user and group are right and
> dnsmasq is running as root.

Dnsmasq starts as root, but it normally runs as another user. The 
distributed code defaults to "nobody" but it might be a dnsmasq-specific 
user on some Linux distros. (On Debian and Ubunutu, it's "dnsmasq").

Try making the file world-readable as a test, then tighten up the 
permissions if you need to.

The logging is a bit confusion here: the second "read <filename>" line 
is a lie, believe the first line.


HTH

Simon.

>
>>> Can you do an arping from a computer from an another hub to a specific
>>> VM instance ??
>>> Is it the same when physical machines are added to the config file ??
>
> Harish, yes. Arpings to the IPs assigned works. I am only adding guest
> machine information into the hostsfile.
>
> The problem is dnsmasq overlooks --dhcp-hostsfile completely. I even used
> the 'static' keyword in --dhcp-range=<startip><,dstip><,mode>
>
> Are there any reasons why dnsmasq would do that? The options passed look
> good.
>
> Thanks,
> Shashank
> ---------------------------------------------------------
>
>
> On Tue, Jul 3, 2012 at 11:13 PM, harish badrinath<harishbadrinath at gmail.com
>> wrote:
>
>>> I am trying to set up a virtual network (VMs run on KVM) with different
>> VMs
>>> running on different vlans. For each network, I have precomputed the
>> mac:ip
>>> mappings and written to a dhcp-hostsfile specific to that network.
>>
>>
>> Can you do an arping from a computer from an another hub to a specific
>> VM instance ??
>> Is it the same when physical machines are added to the config file ??
>>
>> I ask these because Mac address and vm instances have always been a
>> hit and a miss for me personally.
>> S's have always been a pain to work with until now ..
>>
>
>
>
> _______________________________________________
> 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