Files
smartdns/docs/config/resolv-dnsmasq-lease.md
2023-03-10 23:53:17 +08:00

19 lines
738 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
hide:
- toc
---
# 解析本地主机名称
smartdns可以配合DNSMASQ的dhcp lease文件支持本地主机名->IP地址的解析可以配置smartdns读取dnsmasq的lease文件并支持解析。具体配置参数如下
注意DNSMASQ lease文件每个系统可能不一样需要按实际情况配置
```shell
dnsmasq-lease-file /var/lib/misc/dnsmasq.leases
```
配置完成后,可以直接使用主机名连接对应的机器。但需要注意:
1. Windows系统默认使用mDNS解析地址如需要在windows下用使用smartdns解析则需要在主机名后面增加`.`表示使用DNS解析。如`ping smartdns.`
1. smartdns会周期监控文件变化并自动加载变化的映射关系。