Announcement

Collapse
No announcement yet.

DNS resolution broken

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DNS resolution broken

    My home router hands out dhcp licenses including the dns resolver to use -- my own nameserver on my local network.

    Just installed 17.04 and everything looks great except I cannot get it to use my own nameserver. I catted /etc/resolv.conf to find an unpleasant surprise -- systemd is now involved in name resolution! What joy.
    I'll leave the rant about systemd for another time, I just need to get this to work.

    So systemd-resolve --status shows the correct IP (my own nameserver) listed first, along with the gateway IP(!?) second. I didn't ask my gateway (home router) to include itself in the list of dns servers it provides with dhcp licenses but it's possible it does this anyway I suppose. Is it also possible that systemd is trying to be clever (and failing) again by automatically including gateway IPs in the list of resolvers??

    In any case it seems it doesn't use the first IP in the list (my name server) it uses the second (the gateway), even though the first would have resolved the lookups to my local servers while the second can't. So I have no DNS for my local network. What is going on here? The NetworkManager gui shows no 'additional' dns servers configured, and /etc/NetworkManager/NetworkManager.conf has no 'dns' entry.
    Last edited by spoovy; Aug 09, 2017, 07:07 AM.

    #2
    Oh my. Just found this bug report:
    https://github.com/systemd/systemd/issues/5755

    Systemd switches the order name servers are queried in *deliberately*. It's a feature!!

    What the actual f**? I've no words.

    Comment


      #3
      Sure it's a feature. A "round robin" feature.
      Like the old saying goes, "you can make some of the people happy all the time, and all of the people happy some of the time, but you cannot make all the people happy all of the time".

      Have you added your local DNS to /etc/systemd/resolve.conf?
      # You can change settings by editing this file.
      # Defaults can be restored by simply deleting this file.
      #
      # See resolved.conf(5) for details

      [Resolve]
      #DNS=
      FallbackDNS=2001:470:20::2 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
      #Domains=
      #LLMNR=yes
      #DNSSEC=no

      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Thanks for the reply. You mean the IP of my local nameserver? I just tried it now but I don't see how that helps, the IP is already in systemd's list of nameservers anyway. Also I'm not always at home so hardcoding my home nameserver makes no sense. The problem is that the other nameserver in the list -- the router/gateway -- is always in the list, despite me not putting it there or wanting it there, so about 50% of the time this is the one that is queried. Being just router it isn't aware of my local zone and so just returns the IP of one of my ISP's nameservers.

        Seriously though, a feature?? This is fundamentally changing how name resolution works on Linux. Why not just provide an option to 'round-robin' nameservers if people wanted it, then see if it becomes popular? Instead the time-honoured paradigm has been completely upended with no apparent way to opt out and choose the traditional/sane/expected method. I'm staggered by this I really am.

        Comment


          #5
          I found out that it was my router that was including itself on the list of nameservers handed out. Very odd behaviour that could only be sorted by flashing it with custom firmware. This still means of course that if I had wanted to use the router or a public nameserver (8.8.8.8 or something) as a backup then I would still be screwed.

          Comment


            #6
            I'm staggered by this I really am.
            You wouldn't be, if you'd observed the systemd controversy, or Lennart Poettering, or the cabal at Red Hat.

            Regards, John Little
            Regards, John Little

            Comment

            Working...
            X