OpenWrt Forum Archive

Topic: How to prevent dnsmasq to send DNS and default gateway DHCP option ?

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi !

I have a brand new WRT54GL on which I've installed latest openwrt (backfire 10.03.1 r29592).
I've bought this router to make a private WLAN on which there is no gateway and no DNS. As computer connected to this WLAN are also connected to another network with gateway & dns, I don't want to touch their config.

That's why I want the DHCP on the WLAN to NOT send DNS & default gateway DHCP options. But I can't find how to do that !

I've been able to disable the DNS server of dnsmasq, but it's still sending the DNS option (that is not correct now, as there is no DNS server running on the wrt54gl now).

Is there a way to configure this ?

In the default 'dhcp' config, there is a "option 'router'" that I've removed hoping this would at least stop the sending of option 3, but it's not. I could not find its role in the doc (http://wiki.openwrt.org/doc/uci/dhcp ).

Thanks for any hint/help !

Marc

Ok, found it, after several hour of digging... And few minutes after asking for help !

Simply add the following lines in dnsmasq.conf:

option-dhcp=3
option-dhcp=6

This will disable the sending of option 3 (default router) and 6 (dns server)

The discussion might have continued from here.