Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: DNS resolution randomly stops working

  1. #1

    Default DNS resolution randomly stops working

    I had an issue previously where DNS resolution would stop working after disconnecting from a VPN connection. This initially appeared to be a problem with a 3rd party application, netextender, but would also occasionally occur when using an openVPN connection via network manager. This issue was present on my old laptop. I could usually resolve it by running

    Code:
    netconfig -f update
    which would restore DNS resolution.

    However, I have since installed LEAP 15 on a brand new laptop and am again having problems with DNS resolution. This time however, it just happens at random and has nothing to do with VPN connections (I'm not even using netextender anymore). Also, running the netconfig -f update command does not fix the problem anymore. I can only fix it by restarting the network from systemd.

    Anyone have any advice on what to check so I can figure out what is causing this problem?

    Thanks.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,646

    Default Re: DNS resolution randomly stops working

    Look at (and post) the contents of /etc/resolv.conf when you have the problem.

    You can of course also look there when you do not have the problem to give you an idea what works.
    Henk van Velden

  3. #3
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    140

    Default Re: DNS resolution randomly stops working

    Is your system running with NSCD? Try running a while with nscd deactivated (it's usually not needed), and try the same VPN connect+disconnect again.

    (Maybe it's one of the two hard problems of programming in action all over again:
    • naming things
    • cache invalidations
    • off-by-one errors

    This is my favorite programming joke!)

    Cheers, good luck!

  4. #4

    Default Re: DNS resolution randomly stops working

    Quote Originally Posted by hcvv View Post
    Look at (and post) the contents of /etc/resolv.conf when you have the problem.

    You can of course also look there when you do not have the problem to give you an idea what works.
    The resolv.conf file doesn't change before or after I lose DNS resolution. The only uncommented line is

    Code:
    nameserver 192.168.1.1
    Which is my router, obviously. The router isn't the problem. I've tried changing it to 8.8.8.8, it doesn't make any difference.

    Quote Originally Posted by unix111
    Is your system running with NSCD? Try running a while with nscd deactivated (it's usually not needed), and try the same VPN connect+disconnect again.
    NSCD is running. I disabled it for host caching. Hopefully that will help. I'll let you know.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,937
    Blog Entries
    1

    Default Re: DNS resolution randomly stops working

    Name caching isn’t required, but if in use you could try restarting it with
    Code:
    sudo systemctl restart nscd
    openSUSE Leap 15.0; KDE Plasma 5

  6. #6

    Default Re: DNS resolution randomly stops working

    nscd doesn't seem to be the problem since it's still happening. Seems to be getting worse too as it's dropped out several times over the last couple hours. However, I think my problem might be some issue with IPv4 vs IPv6. When my connectivity drops out, I can resolve an IPv6 address, but cannot ping, nor resolve IPv4. For example, pinging google results in:

    Code:
    PING google.com(sea15s07-in-x0e.1e100.net (2607:f8b0:400a:800::200e)) 56 data bytes
    
    --- google.com ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2051ms
    But, after I either disconnect and reconnect to my router, or restart networking, I am able to resolve the IPv4 address and can again ping:

    Code:
    PING google.com (172.217.14.206) 56(84) bytes of data.
    64 bytes from sea30s01-in-f14.1e100.net (172.217.14.206): icmp_seq=1 ttl=52 time=58.9 ms
    64 bytes from sea30s01-in-f14.1e100.net (172.217.14.206): icmp_seq=2 ttl=52 time=60.7 ms
    64 bytes from sea30s01-in-f14.1e100.net (172.217.14.206): icmp_seq=3 ttl=52 time=56.7 ms
    
    --- google.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2003ms
    I disabled IPv6 in Yast, which apparently did nothing because I still get this exact same result either way. Advice? Thanks.

  7. #7
    Join Date
    Sep 2012
    Posts
    4,927

    Default Re: DNS resolution randomly stops working

    Quote Originally Posted by z2 View Post
    Advice?
    Try setting "nameserver 8.8.8.8"; does it make any difference?

  8. #8

    Default Re: DNS resolution randomly stops working

    Quote Originally Posted by arvidjaar View Post
    Try setting "nameserver 8.8.8.8"; does it make any difference?
    I tried that, it makes no difference.

  9. #9
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    140

    Default Re: DNS resolution randomly stops working

    Quote Originally Posted by z2 View Post
    I disabled IPv6 in Yast, which apparently did nothing because I still get this exact same result either way. Advice? Thanks.
    Disabling IPv6 seems like a tricky thing nowadays. I disabled it in so many locations:
    • YaST-Networking
    • YaST sysconfig variables
    • custom initrd: dracut --omit "img-lib cifs fcoe fcoe-uefi rdma multipath iscsi qemu lvm mdraid dm dmraid cdrom pollcdrom plymouth . . . ipv6"
    • kernel boot parameter: ipv6.disable=1
    • NetworkManager (I don't use wicked)
    • creating a file /etc/modprobe.d/blacklist-ipv6.conf, contents: blacklist ipv6


    … and even then there's the odd dracut script or systemd doodad having hard-coded ipv6 dependences (for example echoing a value into a virtual and now nonexisting /sys or /proc file, which results in errors usually ignored.)
    Not that I'm against ipv6, I just prefer to disable anything optional (like nscd).

  10. #10
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,360

    Question Re: DNS resolution randomly stops working

    Quote Originally Posted by z2 View Post
    Which is my router, obviously.
    Meaning that, your Router should supply the needed DNS resolution via DHCP:

    1. Within YaST Network Settings, how are setting up the network? -- with Network Manager or wicked?
    2. Within YaST Network Settings, is the standard route being resolved by means of DHCP
    3. Within YaST Network Settings, are you setting the host name by means of DHCP?
    4. Within YaST Network Settings, have specified a local domain name which corresponds to the domain name of the local network proposed by the router?
    5. Within YaST Network Settings, have you setup anything within the “Routing” tab?

    The related openSUSE documentation is here: <https://doc.opensuse.org/documentati...c.network.yast>.


    • Are you certain that, your Internet Service Provider (ISP) has only assigned an IPv4 address to your Router?
    • Are you certain that, your Router can properly handle DNS and, if your ISP is using IPv6, can your Router properly handle IPv6 DNS?

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •