[Dnsmasq-discuss] general question

Staenker staenker at web.de
Tue Jul 19 23:30:38 BST 2005


The first way is not the i want to do.
The second way doasn't work. Here's a part of my /etc/dnsmasq.conf:
mrsec:~# cat /etc/dnsmasq.conf | grep ^dhcp-host
dhcp-host=00:0e:35:05:f4:67,mrlapwl,192.168.1.2
dhcp-host=00:40:05:54:16:83,mrschnegge,192.168.1.3
dhcp-host=00:0E:0C:5E:8F:5D,mraps,192.168.0.2
dhcp-host=00:0E:0C:5E:8F:80,mrbig,192.168.0.3
dhcp-host=00:02:3f:14:4e:6b,mrlapl,192.168.0.4
dhcp-host=08:00:06:25:7E:08,debian,192.168.0.5

And here what i expect you want to know too:
mrsec:~# cat /var/lib/misc/dnsmasq.leases
1121814392 00:40:05:54:16:83 192.168.1.3 mrschnegge 01:00:40:05:54:16:83
1121814647 00:0e:35:05:f4:67 192.168.1.2 mrlapwl 01:00:0e:35:05:f4:67
mrsec:~# ping mrlapwl
ping: unknown host mrlapwl

If i write the hosts into /etc/hosts it works.

If you want to have a full listing of my /etc/dnsmasq.conf i'll post it.

Thanks for your answer

Richard


Simon Kelley wrote:
> Staenker wrote:
> 
>> Hello,
>> i am new to dnsmasq. I modified the config file a bit and its still
>> working...
>>
>> Now to my question: I want dnsmasq to resolv the names of its dhcp
>> clients. E.g. a client with mac 00:00:0c:00:99:00 requests an ipaddress.
>> Its name is george. After he has recieved ip 192.168.1.2  from dnsmasq
>> dhcpd i want to be able to ping him with "ping george". That doasn't
>> worked for me until i added a line to /etc/hosts with static ip. But if
>> george gets another ip that wont work.
>>
>> So do i have to wrote a bash-script for dynamic changes of /etc/hosts or
>> is there any functionality provided by dnsmasq?
> 
> 
> The functionality is provided by dnsmasq.
> 
> There are two different ways to make it work.
> 
> In the first, the host tells dnsmasq what its name is when it requests
> an IP address. Look at the documentation for the DHCP client you are
> using to see how to do that.
> 
> In second, the configuration of dnsmasq tells dnsmasq what the name a
> host has, based on it's MAC address, so you could add
> 
> dhcp-host=00:00:0c:00:99:00,george
> 
> to /etc/dnsmasq.conf
> 
> 
> HTH
> 
> 
> Simon.
> 
>>
>> Regards,
>> Richard Hauswald
>>
>> _______________________________________________
>> 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