You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Make sure all devices are registered in DNS with the configured domain name appended, e.g. ``smartphone.lan.internal``.
480
+
This ensures that ``smartphone`` can exist in both ``lan.internal`` and ``guest.internal``.
481
+
- Register the DHCP domain name as local, which will make Dnsmasq authoritative for this domain, ensuring ``NXDOMAIN`` is returned
482
+
for devices querying unknown hostnames within this local domain.
473
483
474
484
- Press **Apply**
475
485
@@ -554,12 +564,18 @@ Our smartphone now has the following IP configuration:
554
564
- DNS Server: ``192.168.1.1``
555
565
556
566
At the same time, Dnsmasq registers the DNS hostname of the smartphone (if it exists). Since we configured the FQDN option and domain in the DHCP range, the name of the
557
-
smartphone will be: ``smartphone.lan.internal``.
567
+
smartphone will be: ``smartphone.lan.internal.``.
558
568
559
-
When a client queries `Unbound` for exactly ``smartphone.lan.internal``, the configured query forwarding sends the request to the DNS server responsible for ``lan.internal``
560
-
which is our configured `Dnsmasq` listening on ``127.0.0.1:53053``. ``Dnsmasq`` responds to this query and will resolve the current A-Record of ``smartphone.lan.internal`` to
569
+
When a client queries `Unbound` for exactly ``smartphone.lan.internal.``, the configured query forwarding sends the request to the DNS server responsible for ``lan.internal.``
570
+
which is our configured `Dnsmasq` listening on ``127.0.0.1:53053``. ``Dnsmasq`` responds to this query and will resolve the current A record of ``smartphone.lan.internal.`` to
561
571
``192.168.1.100``, sending this information to `Unbound` which in return sends the response back to the client that initially queried.
562
572
573
+
.. Tip::
574
+
575
+
You can usually resolve a hostname in your network by querying for e.g. ``smartphone``. This works because client systems
576
+
recognize that a FQDN is not used, and will therefore suffix the request with their domain name received from Dnsmasq, transforming
577
+
the query to ``smartphone.lan.internal.``.
578
+
563
579
As you can see, this is a highly integrated and simple setup which leverages just the available DHCP and DNS standards with no trickery involved.
0 commit comments