[Dnsmasq-discuss] dhcp-option=121 doesn't seem to work

Simon Kelley simon at thekelleys.org.uk
Wed Dec 19 14:45:18 GMT 2007


Guennadi Liakhovetski wrote:
> Hi,
> 
> I need to set a (not default) route for a specific host only, and there is 
> a default route entry as well. So, I tried in dnsmasq.conf
> 
> dhcp-option=3,<default-gateway>
> dhcp-option=<client-ip>,121,<target-network>/24,<gateway-ip>
> 
> where gateway-ip and client-ip are from the same network. Then I run 
> wireshark on the client during the dhcp configuration, and see no 121 
> option set. dnsmasq from Debian-etch (stable) version 2.35-1. Also tried 
> without the <client-ip> - the same. Am I doing anything wrong?

Go back to you wireshark dump and look at the DHCP request packet going
from the client to dnsmasq. In the options section, look for the "option
request list". If that doesn't include 121 (I suspect it doesn't) then
that's why the option 121 information is not being sent.

Most DHCP clients don't support option 121 without tweaking, but I think
the Debian dhclient maintainer was working on it, so if your client is
Debian, moving to the latest client version might help.

> 
> And as I am already at it - is there a way with dnsmasq to only allow 
> specific hosts get dhcp leases? I do need a dhcp-range entry in any case. 
> If, say, I have only 3 clients on my network I can specify the range as 
> x.y.z.1-x.y.z.3, but if only x.y.z.1 is online, will the rest not be 
> available for arbitrary hosts?


dhcp-range=x.y.z.1,static

will enable DHCP on that network, but only for known hosts.


Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list