You are not logged in.
I have an Ubuntu machine running dnsmasq on my LAN that is configured so:
no-resolv
server=8.8.4.4
server=8.8.8.8
interface=br0
domain=adomain.local
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-authoritativePreviously, I've used Debian and other Ubuntu machines to resolve other hostname.local on the LAN. Now, it doesn't resolve anything on the LAN. CUPS was able to find the network printer, but that's probably unrelated.
systemd-resolvd was not enabled, but after I enabled and ran the service, I was able to resolve LAN hostnames, but only got IPv6 addresses. I have a webserver on the LAN and Firefox can either not use the IPv6 address or the server doesn't respond to the IPv6 address. Either way, I need my Arch to behave as other Linux machines in regards to the hostname resolution.
Last edited by oxwivi (2019-07-02 09:54:32)
Offline
Maybe elaborate on the actual arch system (network) config and behavior??? The resolver, the nss config, running services, this kind of stuff?
However, get resolved out of the equation and also .local is an mdns/avahi thing so there's a good chance that ubuntu either resolves hostnames using mdns (and not your supposed dnsmasq) or vv. arch tries an mdns resolution and therefore doesn't get to your dnsmasq resolver. But w/ zero actual information on the system and the network setup other than a config file on a dnsmasq server that might or not be actually in place anywhere, this is all just blind guessing around and will go absolutely nowhere.
Offline
Maybe elaborate on the actual arch system (network) config and behavior??? The resolver, the nss config, running services, this kind of stuff?
Please guide me on the network services and configuration that affects resolving process. I don't know where to start if I want to debug by myself. At least, I want to figure out from where the resolver is resolving any address to begin with.
Here's the nsswitch.conf:
# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.
passwd: files mymachines systemd
group: files mymachines systemd
shadow: files
publickey: files
hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: filesOffline
... domain=adomain.local ...
Don't use .local for DNS, it's reserved for mDNS. If you want a custom TLD for your LAN, pick one from https://tools.ietf.org/html/rfc6762#appendix-G
... hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns ...
You have not set up mDNS hostname resolution. Read https://wiki.archlinux.org/index.php/Av … resolution .
Last edited by nl6720 (2019-07-02 12:58:00)
Offline
oxwivi wrote:... hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns ...You have not set up mDNS hostname resolution. Read https://wiki.archlinux.org/index.php/Av … resolution .
... So, it has nothing to do with the dnsmasq I setup? Off-topic, but can it be done with the DNS so we can avoid device inconsistency like it was in this case? Maybe with systemd-resolved? I've been planning to remove dnsmasq in favor resolved sometime, as long as it conforms with the dnsmasq configuration equivalent.
Offline
dnsmasq can't serve mDNS, only DNS. I don't know if or how it worked for you before, but using .local for DNS is just asking for trouble.
If you want to serve DNS to a network, you will not be able to adequately replace dnsmasq with systemd-resolved, since systemd-resolved is not a DNS server.
Offline
If you want to serve DNS to a network, you will not be able to adequately replace dnsmasq with systemd-resolved, since systemd-resolved is not a DNS server.
Well, resolved certainly binds the standard DNS ports and conflicts with actual DNS when installed.
Besides that, what's the default resolver on Arch? It's been resolving fine without enabling resolved. What role does it play anyway?
Offline
Besides that, what's the default resolver on Arch?
From [1] files (/etc/hosts) then mymachines then myhostname then resolve if unavailable then dns (glibc)
Offline
Read https://wiki.archlinux.org/index.php/Avahi
Use avahi-browse (probably already available on your ubuntu machines) or "sudo nmap -sU -p 5353 <IP>" to see whether your ubuntu clients provide avahi/mdns/zeroconf/bonjours (why are there so many names…) - if so, you've relied on that all the time.
If you then want to shift to dnsmasq, steer away from the .local TLD and make it work w/ something legit. Once that works and you still insist on using the .local TLD (not advisable) shift towards that. You'll very most likely have to ensure that avahi isn't running/configured on any involved client because .local is by default resolved there.
Offline
Thank you all for the help, it turns out all I was looking for was these options for dnsmasq:
local=/lan/
domain=lan
expand-hostsI had thought I achieved the effect of the above with merely domain=local before.
Offline
I have been reading on systemd-resolved and Network Switch Service Arch Wiki pages, but I'm not quite clear what functions are made available once I systemctl enable systemd-resolvef with default configuration parameters. If I understood correctly, -resolved provides the following three services by default:
- a DNS cache
- a method to add local hostname and address combo without editing /etc/hosts
- container resolution
And also NetworkManager and maybe other similar utilities might use the -resolved services automatically if it's enabled and running, is that right?
Offline