[Dnsmasq-discuss] Announce: dnsmasq-2.53 release candidate 1

Simon Kelley simon at thekelleys.org.uk
Tue May 25 17:09:55 BST 2010


clemens fischer wrote:
> Simon Kelley wrote:
> 
>> The hostname and lease time are both data that dnsmasq uses locally,
>> they are not just opaque data that's passed through to the client.
>> I think there's code which explicitly blocks setting those options. It
>> would be bad if you sent an option 51 that told the client that it had
>> a lease for a day, but dnsmasq expired the lease after an hour and the
>> host disappeared from the DNS.
> 
> Oh, I thought the hostname is something sent to the client like any
> other option!  Do I understand you correctly that it is used more like
> an item to match when the client sends it?  Normally not sent to the
> client?

The hostname is sent to the client: It's determined from the hostname
the client sends (if any) and potentially a large amount of dnsmasq
configuration, and sent to the client. It's also used to update the DNS
part of dnsmasq.

Similarly the lease length is sent to the client and used to update
dnsmasq's lease database. Allowing the values of these options to be
overridden so that dnsmasq has a different idea of what they are then
dnsmasq is going to cause great confusion.

>> An example helps: if you have an network which is 192.168.1.0/24 and you
>> specify
>>
>> dhcp-range=192.168.1.100,192.168.1.200
>>
>> then clients will get addresses in the range specified. Unless
>> you have
>>
>> dhcp-host=00:11:22:33:44:55,192.168.1.20
>>
>> which is valid because 192.168.1.20 is within the 192.168.1.0/24 subnet,
>> so a client with that mac-address will get 192.168.1.20.
>>
>> On the other hand
>>
>> dhcp-host=00:11:22:33:44:55,192.168.2.20
>>
>> would be ignored because the IP address is not within the subnet.
> 
> Ok.  I kept asking myself how dnsmasq can know the proper netmask.  So
> it obviously reads that from the interface.
> 
It does, and it's possible to specify it explicitly too. That's required
when using DHCP-relay because the interface is somewhere else, and
dnsmasq can't discover the netmask for itself.


Cheers,

Simon.


> 
> clemens
> 
> 
> _______________________________________________
> 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