[Dnsmasq-discuss] DHCP with no default route and no DNS

Simon Kelley simon@thekelleys.org.uk
Tue, 03 May 2005 21:40:22 +0100


Jim Faulkner wrote:

> I would like dnsmasq to not provide a gateway and DNS server to clients on
> the wireless network at all.  I've attempted this by adding these lines to
> the configuration file:
> dhcp-option=wireless-net,3,0
> dhcp-option=wireless-net,6,0
> 
> On a windows 2000 client, the above lines work perfectly at disabling a
> default route and DNS server.  However, whenever I add either of these
> options to the configuration file, the client gets 255.255.255.255 as
> its subnet mask.  This causes the client to be unable to connect to the
> VPN.
> 

The two dhcp-option lines are wrong, they are interpreted by dnsmasq as 
"return a single zero byte of data in reply to a request for option 3 or 
6". Since the client is expecting  a four-byte IP address as an answer 
for option 3, it looks like it is getting confused, that probably 
explains the strange netmask effects.

If instead, you do

dhcp-option=wireless-net,3
dhcp-option=wireless-net,6

then you will inhibit sending the gateway and DNS server option 
completely, which is what you want. You should not need to explicitly 
set the netmask (option 1) at all.


HTH

Simon.