7

为ddwrt DHCP分配指定网关配置

 2 years ago
source link: https://www.nixonli.com/24155.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ddwrt默认的DHCP 设置是没有设置网关的地方。
如图:

我们需要为DHCP使用DNSMasq来进行DHCP服务

在【服务】》【服务】
在DHCP服务器选项,已使用的域选择(LAN & WLAN)

在DNSMasq设置选项启用:DNSMasq,本地DNS,Query DNS in Strict Order其他选项为关闭

在DNSMasq附加选项使用dhcp-option来设置

dhcp-option=br0,3,a.b.c.d

如DHCP指定为192.168.1.2即为:
dhcp-ooption=br0,3,192.168.1.2

指定DNS

dhcp-option=6,a.b.c.d,a.b.c.d

如为指定DNS为192.168.1.2及8.8.8.8即为:
dhcp-option=6,192.168.1.2,8.8.8.8

设置选项说明请参考这篇文章的列表说明
https://www.nixonli.com/23968.html

如图设置:

这样设在网保存设置,应用即可获得指定网关即DNS的功能

https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server#Assign_an_alternate_Gateway


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK