bgvaughan
Occasional Visitor
All domain names and IP addresses are falsified to protect pre-adolescent Minecraft enthusiasts. I'm currently using the firmware 3.0.0.3.178.15 (Merlin build).
I've been using manually assigned IPs via DHCP on my router for some time. Recently, I assigned a domain name to my router on the "LAN - DHCP Server" screen, in the field, "RT-N66U's Domain Name". From what I can tell, DHCP is correctly informing clients of the domain name, "example.com", and nodes are using that domain name as their default search domain. E.g., the first lines of /etc/resolv.conf on my Fedora Linux box are:
However, it looks like DNSMasq is not attaching the domain name to hostnames. I noticed that "hostname -A" returns only the hostname for my Linux box, "fedora", while "hostname -f" returns "fedora.example.com". If I understand properly, "hostname -f" checks local files first, and correctly combines my hostname with the default search domain to produce a FQDN, but "hostname -A" goes through DNS resolution for each IPv4 address on a network interface.
Querying the router's DNS, via "dig -x 192.168.1.2 @192.168.1.1", and through "host" and "nslookup", only gets my hostname, "fedora", not "fedora.example.com". "fedora" can be resolved to 192.168.1.2, but "fedora.example.com" cannot be resolved. The same goes for other nodes on my LAN: DNS on the router always treats the bare hostname as the FQDN, and any search involving the domain name fails.
Here's /etc/dnsmasq.conf from the router:
From what I can make out from the documentation for DNSMasq, there should probably be a line, "domain=example.com", so that "expand-hosts" causes DHCP to append the domain name to hostnames for DNS. "dhcp-option=15,example.com", I think, causes the domain name to be sent to DHCP clients, so that it's used as a search domain. I'm not sure if that would be redundant with "domain=example.com", or if the two would conflict.
I tried adding "domain=example.com", and that didn't seem to change the results with DNS resolution. Nor did it after I executed "killall -s SIGHUP dnsmasq" on the router. Rebooting the router resets /etc/dnsmasq.conf, so the line I added wasn't there. I assume a reboot would also reset /etc/hosts on the router, so I haven't tried editing it to include the FQDNs for my LAN nodes.
So I'm at wits' end. Is there a bug, a misconfiguration, or am I missing something?
I've been using manually assigned IPs via DHCP on my router for some time. Recently, I assigned a domain name to my router on the "LAN - DHCP Server" screen, in the field, "RT-N66U's Domain Name". From what I can tell, DHCP is correctly informing clients of the domain name, "example.com", and nodes are using that domain name as their default search domain. E.g., the first lines of /etc/resolv.conf on my Fedora Linux box are:
# Generated by NetworkManager
domain example.com
search example.com
However, it looks like DNSMasq is not attaching the domain name to hostnames. I noticed that "hostname -A" returns only the hostname for my Linux box, "fedora", while "hostname -f" returns "fedora.example.com". If I understand properly, "hostname -f" checks local files first, and correctly combines my hostname with the default search domain to produce a FQDN, but "hostname -A" goes through DNS resolution for each IPv4 address on a network interface.
Querying the router's DNS, via "dig -x 192.168.1.2 @192.168.1.1", and through "host" and "nslookup", only gets my hostname, "fedora", not "fedora.example.com". "fedora" can be resolved to 192.168.1.2, but "fedora.example.com" cannot be resolved. The same goes for other nodes on my LAN: DNS on the router always treats the bare hostname as the FQDN, and any search involving the domain name fails.
Here's /etc/dnsmasq.conf from the router:
pid-file=/var/run/dnsmasq.pid
resolv-file=/tmp/resolv.conf
expand-hosts
min-port=4096
dhcp-range=192.168.1.2,192.168.1.254,255.255.255.0,86400s
dhcp-lease-max=253
dhcp-authoritative
dhcp-option=3, 192.168.1.1
dhcp-option=15,example.com
dhcp-option=44,0.0.0.0
read-ethers
From what I can make out from the documentation for DNSMasq, there should probably be a line, "domain=example.com", so that "expand-hosts" causes DHCP to append the domain name to hostnames for DNS. "dhcp-option=15,example.com", I think, causes the domain name to be sent to DHCP clients, so that it's used as a search domain. I'm not sure if that would be redundant with "domain=example.com", or if the two would conflict.
I tried adding "domain=example.com", and that didn't seem to change the results with DNS resolution. Nor did it after I executed "killall -s SIGHUP dnsmasq" on the router. Rebooting the router resets /etc/dnsmasq.conf, so the line I added wasn't there. I assume a reboot would also reset /etc/hosts on the router, so I haven't tried editing it to include the FQDNs for my LAN nodes.
So I'm at wits' end. Is there a bug, a misconfiguration, or am I missing something?