【重要,转+已验证】给指定 mac 的设备分配 指定地址网关,dns。

如:给mac 11:22:33:44:55:66 指定网关、DNS为 172.16.0.1

# config mac ‘opnvpn’
# option mac ’00:FF:*:*:*:*’
# option tag ‘need_outernet’

config host
option ip ‘192.168.1.3’
option mac ’11:22:33:44:55:66 aa:bb:cc:dd:ee:ff’
option tag ‘need_outernet’

config tag ‘need_outernet’
list dhcp_option ‘3, 172.16.0.1’
list dhcp_option ‘6, 172.16.0.1’
option force ‘1’

转载于:https://my.oschina.net/kblack/blog/3019722

相关资源:https://oldwiki.archive.openwrt.org/doc/uci/dhcp 配置文件
特殊mac指定网关
DHCP协议详解Dynamic Host Configuration Protocol