From time to time some people come up with questions on how to advertise a different DNS server or router ip via DHCP.

First prepare the dnsmasq configuration:

uci add_list dhcp.lan.dhcp_option="3,192.168.200.3"
uci add_list dhcp.lan.dhcp_option="6,192.168.200.4,192.168.200.5"
uci commit dhcp

192.168.200.3 (option 3) would be the gateway ip
192.168.200.4 and 200.5 (option 6) are the advertised DNS servers

Then restart dnsmasq to apply the changed settings:

/etc/init.d/dnsmasq restart

You can apply this howto to other dhcp options like wins or ntp servers as well.
For a more detailled list of dhcp options see:
http://www.networksorcery.com/enp/proto … ptions.htm


~ JoW