You are not logged in.

#1 2020-02-14 13:38:25

jones
Member
Registered: 2013-03-14
Posts: 247

[S] DNS problems - Can't ping sites but can browse to them

I noticed I can't use youtube-dl anymore, all the download attempts kind of stall and take nearly 2 hours where I only took ...2 minutes maximum 1-2 weeks ago. All the data transfer work with arguably high speeds (10 MB/s) for a couple of seconds, then nothing happens for like 10 minutes. This is what it looks like right now:

$ youtube-dl https://www.youtube.com/watch?v=zNVCP9PeX9c && exit
[youtube] zNVCP9PeX9c: Downloading webpage
[youtube] zNVCP9PeX9c: Downloading video info webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: /home/john/Videos/youtube/Apple BEAT us... but we're STILL TRYING! - Hack Pro pt 4-zNVCP9PeX9c.f137.mp4
[download]  22.5% of 214.88MiB at  9.52MiB/s ETA 00:17

Nothing, not one number, has changed in the last ...5 minutes or so.

That confuses me greatly because I can browse around on youtube without problems.

So I tried to ping youtube.com. That didn't work as got me confused more. Here is the same problem, but with this very board:

$ ping -c 3 bbs.archlinux.org 
PING bbs.archlinux.org(2a01:4f8:c2c:b1cf::1 (2a01:4f8:c2c:b1cf::1)) 56 data bytes

--- bbs.archlinux.org ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2036ms

So I looked for the IP address:

$ drill bbs.archlinux.org 
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 45289
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; bbs.archlinux.org.	IN	A

;; ANSWER SECTION:
bbs.archlinux.org.	86400	IN	A	116.203.93.142

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 23 msec
;; SERVER: 192.168.0.1
;; WHEN: Fri Feb 14 14:19:13 2020
;; MSG SIZE  rcvd: 51

Pinging the IP address works though.

$ ping -c 3 116.203.93.142
PING 116.203.93.142 (116.203.93.142) 56(84) bytes of data.
64 bytes from 116.203.93.142: icmp_seq=1 ttl=50 time=194 ms
64 bytes from 116.203.93.142: icmp_seq=2 ttl=50 time=30.2 ms
64 bytes from 116.203.93.142: icmp_seq=3 ttl=50 time=24.7 ms

--- 116.203.93.142 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 24.695/82.877/193.758/78.436 ms

$ ping -c 3 youtube.com

PING youtube.com(fra15s18-in-x0e.1e100.net (2a00:1450:4001:81d::200e)) 56 data bytes

--- youtube.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2019ms

This phenomenon is also true for google.com, but not for reddit.com.
$ ping -c 3 reddit.com

PING reddit.com (151.101.65.140) 56(84) bytes of data.
64 bytes from 151.101.65.140 (151.101.65.140): icmp_seq=1 ttl=55 time=19.3 ms
64 bytes from 151.101.65.140 (151.101.65.140): icmp_seq=2 ttl=55 time=21.7 ms
64 bytes from 151.101.65.140 (151.101.65.140): icmp_seq=3 ttl=55 time=19.8 ms

--- reddit.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 19.337/20.269/21.656/0.999 ms

So the lookup uses IPv6 for some, but not for all? Why is that? In any way, can I change that behavior so DNS is always based on IPv4? (I do not even know  if I wrote that correctly, please forgive me, the technicalities are a bit too much for me.)

Here is some more info I can provide because I read about these settings in other forum posts.
$ cat /etc/systemd/resolved.conf - I have changed this file, i.e. I set the option "DNSSEC" to 'no' because of a journal entry that stated it used degraded feature set on the DNS server (UDP), if I remember the phrasing correctly.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# 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=1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=allow-downgrade
DNSSEC=no
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

$ cat /etc/resolv.conf

# Generated by resolvconf
domain home
nameserver 192.168.0.1
nameserver 2a02:908:2:a::1
nameserver 2a02:908:2:b::1

To the best of my knowledge, I did not change anything in regards to any DNS/name resolving ...things.

Would anyone happen to have helpful ideas, what I can try to do?

Last edited by jones (2020-02-17 11:53:06)

Offline

#2 2020-02-14 22:54:22

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: [S] DNS problems - Can't ping sites but can browse to them

youtube-dl -F https://www.youtube.com/watch?v=zNVCP9PeX9c
[youtube] zNVCP9PeX9c: Downloading webpage
[youtube] zNVCP9PeX9c: Downloading video info webpage
[info] Available formats for zNVCP9PeX9c:
format code  extension  resolution note
599          m4a        audio only tiny   32k , mp4a.40.5 (22050Hz), 4.18MiB
600          webm       audio only tiny   38k , opus  (48000Hz), 4.69MiB
249          webm       audio only tiny   56k , opus @ 50k (48000Hz), 6.90MiB
250          webm       audio only tiny   72k , opus @ 70k (48000Hz), 9.09MiB
140          m4a        audio only tiny  131k , m4a_dash container, mp4a.40.2@128k (44100Hz), 17.59MiB
251          webm       audio only tiny  138k , opus @160k (48000Hz), 17.24MiB
598          webm       256x128    144p   31k , vp9, 15fps, video only, 3.34MiB
597          mp4        256x128    144p   42k , avc1.4d400b, 15fps, video only, 3.89MiB
278          webm       256x128    144p   86k , webm container, vp9, 30fps, video only, 10.67MiB
160          mp4        256x128    144p   99k , avc1.4d400c, 30fps, video only, 8.53MiB
133          mp4        426x214    240p  199k , avc1.4d400d, 30fps, video only, 15.77MiB
242          webm       426x214    240p  200k , vp9, 30fps, video only, 21.55MiB
243          webm       640x320    360p  365k , vp9, 30fps, video only, 37.79MiB
134          mp4        640x320    360p  495k , avc1.4d401e, 30fps, video only, 35.98MiB
244          webm       854x428    480p  682k , vp9, 30fps, video only, 66.66MiB
135          mp4        854x428    480p 1000k , avc1.4d401f, 30fps, video only, 72.92MiB
247          webm       1280x640   720p 1366k , vp9, 30fps, video only, 132.60MiB
136          mp4        1280x640   720p 1757k , avc1.4d401f, 30fps, video only, 126.59MiB
248          webm       1920x960   1080p 2401k , vp9, 30fps, video only, 237.33MiB
137          mp4        1920x960   1080p 2921k , avc1.640028, 30fps, video only, 214.88MiB
271          webm       2560x1280  1440p 7383k , vp9, 30fps, video only, 545.73MiB
313          webm       3840x1920  2160p 15587k , vp9, 30fps, video only, 1.58GiB
18           mp4        640x320    360p  525k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 71.43MiB
22           mp4        1280x640   720p 1060k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)

You are trying to get -f 137 Maybe try another format.

can I change that behavior so DNS is always based on IPv4?

Yes you can use only IP4. Look at the wiki page for your network manager.
https://wiki.archlinux.org/index.php/IPv6
https://bbs.archlinux.org/viewtopic.php?id=240427
https://wiki.archlinux.org/index.php/DNSSEC

Offline

#3 2020-02-17 11:52:41

jones
Member
Registered: 2013-03-14
Posts: 247

Re: [S] DNS problems - Can't ping sites but can browse to them

Thanks but that youtube-dl command was not the problem. If at all, not using the option "-4" for forcing a IPv4-connection was problematic.

But your links helped, thanks. smile


By following https://wiki.archlinux.org/index.php/IPv6#Disable_IPv6

Alternatively, adding ipv6.disable_ipv6=1 instead will keep the IPv6 stack functional but will not assign IPv6 addresses to any of your network devices.

I added that part to the options line in the config file for loading AL (systemd-boot), I can now ping google.com and youtube.com again.

=> Solved

Offline

Board footer

Powered by FluxBB