Linux Name Resolution (DNS) Failure
Linux Name Resolution (DNS) Failure
Hi.
I'm using a PEAK PCAN-USB FD interface on an embedded device running Ubuntu 18.04 Linux. It works beautifully, but as soon as the device is connected, DNS queries begin to fail. After some research, I've come to believe that this is due to the systemd network service incorporating the CAN bus into the name resolution algorithm.
Obviously this isn't a PEAK issue, but does anyone on the forum have any insight into how to prevent or work around this problem?
Thanks,
-Nick
I'm using a PEAK PCAN-USB FD interface on an embedded device running Ubuntu 18.04 Linux. It works beautifully, but as soon as the device is connected, DNS queries begin to fail. After some research, I've come to believe that this is due to the systemd network service incorporating the CAN bus into the name resolution algorithm.
Obviously this isn't a PEAK issue, but does anyone on the forum have any insight into how to prevent or work around this problem?
Thanks,
-Nick
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Linux Name Resolution (DNS) Failure
Hello Nick,
Which driver are you currently using with your PCAN-USB FD?
Are you using the mainline drivers included in the kernel or are you
using the PCAN-Linux driver package?
If you use the latter, we suspect your use the NetDev variant?
Please let us know.
Best Regards
Marvin
Which driver are you currently using with your PCAN-USB FD?
Are you using the mainline drivers included in the kernel or are you
using the PCAN-Linux driver package?
If you use the latter, we suspect your use the NetDev variant?
Please let us know.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Linux Name Resolution (DNS) Failure
Furthermore,
Usually the CAN interfaces are not set up to handle DNS,
a output for "resolvectl status" would show a CAN-Interface configured like this:
Please check wether or not the CAN-interface is set in
/etc/systemd via:
and
Please report back to us regarding this.
Best Regards
Marvin
Usually the CAN interfaces are not set up to handle DNS,
a output for "resolvectl status" would show a CAN-Interface configured like this:
Code: Select all
Link 4 (can0)
Current Scopes: none
DefaultRoute setting: no
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
/etc/systemd via:
Code: Select all
find /etc/systemd/ -name "can*"
Code: Select all
grep -R can0 /etc/systemd/
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Linux Name Resolution (DNS) Failure
Hi Marvin.
Thanks for the response.
I'm using the built-in drivers.
The information returned by "systemd-resolve --status" includes this section:
For what it's worth, this is identical to the section for eth0, an interface for which name resolution works correctly when the CAN interface is not attached:
"find /etc/systemd/ -name "can*"" produces no output.
"grep -R can0 /etc/systemd/" produces no output (other than "grep: /etc/systemd/system/multi-user.target.wants/lm-sensors.service: No such file or directory").
Thanks again,
-Nick
Thanks for the response.
I'm using the built-in drivers.
The information returned by "systemd-resolve --status" includes this section:
Code: Select all
Link 9 (can0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Code: Select all
Link 2 (eth0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
"grep -R can0 /etc/systemd/" produces no output (other than "grep: /etc/systemd/system/multi-user.target.wants/lm-sensors.service: No such file or directory").
Thanks again,
-Nick
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Linux Name Resolution (DNS) Failure
Hello,
Is the output for
regarding Link2 (Eth0) the same,
if the PCAN-USB FD is not connected?
Please report back to us reagrding this.
Best Regards
Marvin
Is the output for
Code: Select all
systemd-resolve --status
if the PCAN-USB FD is not connected?
Please report back to us reagrding this.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Linux Name Resolution (DNS) Failure
Hi Marvin.
Yes, the output when the PCAN-USB FD is connected is identical to that when it is not connected, except for the addition of the (can0) section. The output for both conditions is below.
PEAK CAN-FD not attached:
PEAK CAN-FD attached:
Additionally, without the PCAN-USB-FD attached, queries via nslookup succeed:
With the PCAN-USB-FD attached, they fail:
But if I specify the DNS server to use, they succeed:
Thanks again for your help with this.
-Nick
Yes, the output when the PCAN-USB FD is connected is identical to that when it is not connected, except for the addition of the (can0) section. The output for both conditions is below.
PEAK CAN-FD not attached:
Code: Select all
# systemd-resolve --status
Global
DNS Servers: 192.168.0.1
DNS Domain: attlocal.net
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 3 (sit0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 2 (eth0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Code: Select all
# systemd-resolve --status
Global
DNS Servers: 192.168.0.1
DNS Domain: attlocal.net
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 9 (can0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 3 (sit0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 2 (eth0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Code: Select all
# nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: google.com
Address: 172.217.1.238
Name: google.com
Address: 2607:f8b0:4007:814::200e
Code: Select all
# nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find google.com: SERVFAIL
Code: Select all
# nslookup google.com 192.168.0.1
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: google.com
Address: 64.233.177.100
Name: google.com
Address: 64.233.177.139
Name: google.com
Address: 64.233.177.113
Name: google.com
Address: 64.233.177.101
Name: google.com
Address: 64.233.177.138
Name: google.com
Address: 64.233.177.102
Name: google.com
Address: 2607:f8b0:4002:810::200e
-Nick
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Linux Name Resolution (DNS) Failure
Hi Nick,
Please check "/etc/systemd/resolved.conf", is any DNS configured?
Do you have a Fallback DNS configured?
Please check this, configure both if necessary and check if that resolved the
issue.
Please report back to us, if this has changed anything for you.
Possibly a service is also handling DNS settings, you might want
to check this for your Distro and if other users experience similar issue (with any plug&play network device)
Best Regards
marvin
Please check "/etc/systemd/resolved.conf", is any DNS configured?
Do you have a Fallback DNS configured?
Please check this, configure both if necessary and check if that resolved the
issue.
Please report back to us, if this has changed anything for you.
Possibly a service is also handling DNS settings, you might want
to check this for your Distro and if other users experience similar issue (with any plug&play network device)
Best Regards
marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Linux Name Resolution (DNS) Failure
Hi Marvin.
DNS is configured via DHCP. "/etc/systemd/resolved.conf" is effectively empty, which should be correct for that configuration. Remember, name resolution works correctly when the PCAN-FD-USB interface is not attached.
I've tried disabling the Avahi (mDNS/Bonjour/Zeroconf) service, but this had no effect on the problem.
Thanks,
-Nick
DNS is configured via DHCP. "/etc/systemd/resolved.conf" is effectively empty, which should be correct for that configuration. Remember, name resolution works correctly when the PCAN-FD-USB interface is not attached.
I've tried disabling the Avahi (mDNS/Bonjour/Zeroconf) service, but this had no effect on the problem.
Thanks,
-Nick
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Linux Name Resolution (DNS) Failure
Hello,
Are you able to reproduce this issue,
when another network-adaptor is added instead of the PCAN-USB FD(a usb-wifi dognle, for example)?
Please let us know.
Best Regards
Marvin
Are you able to reproduce this issue,
when another network-adaptor is added instead of the PCAN-USB FD(a usb-wifi dognle, for example)?
Please let us know.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team