Parsing Local Hostnames
Using DNSMASQ Lease File
SmartDNS can support the resolution of local hostname->IP address by cooperating with DNSMASQ dhcp lease file. SmartDNS can be configured to read the lease file of dnsmasq and support resolution. The specific configuration parameters are as follows (Note that DNSMASQ lease files may vary from system to system and need to be configured according to actual conditions)
dnsmasq-lease-file /var/lib/misc/dnsmasq.leases
After the configuration is completed, you can directly connect to the corresponding machine using the hostname. However, it should be noted that:
- The Windows system defaults to using mDNS to resolve addresses. If you need to use smartdns for resolution under Windows, you need to add
.
after the hostname to indicate the use of DNS resolution, such asping smartdns.
- SmartDNS will monitor file changes periodically and automatically load mapping relationships that have changed.
Using mDNS Lookup
SmartDNS can use mDNS to query local hostnames or IP addresses. The specific configuration is as follows:
mdns-lookup yes