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:

Code:

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:

Code:

/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

原文取自 https://forum.openwrt.org/viewtopic.php?id=17316


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Frank 的頭像
    Frank

    經驗交流分享與備忘

    Frank 發表在 痞客邦 留言(0) 人氣()