nameserver not being set

This forum is for discussion about general software issues.

nameserver not being set

Postby trangtrainam » Thu Jan 09, 2020 9:06 am

I am using arch linux arm on a Raspberry Pi for an embedded application. I have one machine which was set up around a year ago which works excellently, it does not get updated and is still on a 3.18.7 kernel. Just recently I have set up a new machine with a fresh install of arch and the latest kernel 4.4.15, this new device is not correctly setting the nameserver and cant resolve host names. The hardware for both of these machines is identical. Note this is in a commercial environment and I am behind a very restrictive proxy, however both machines are connected to the same wireless network and as far as I can see are set up the same, but something is not working on the new machine.

I have checked everything I know how to check, and cannot find anything wrong. I am hoping someone might be able to point me in the right direction for more things to test to try and narrow this problem down.

IP addresses are assigned by DHCP, on the working machine something (is it dhcpcd?) is finding the correct nameserver and entering into /etc/resolv.conf on the non working machine this is not being set and resolvconf is using the default values of 8.8.8.8 and 8.8.4.4. The google DNS will not work behind my proxy, I must use the local DNS server. If I edit /etc/resolv.conf and manually enter the local DNS and domain then it works until restart. I know I could do this and then make the file read only, but I these devices also need to work in other locations and I can't hard-code a DNS into each device.
trangtrainam
 
Posts: 1
Joined: Sat Jan 04, 2020 4:11 am

Re: nameserver not being set

Postby summers » Thu Jan 09, 2020 9:18 am

summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

Re: nameserver not being set

Postby summers » Fri Jan 10, 2020 11:01 am

Over breakfast this morning, got the chance to read your post more carefully. Recently we have had a spate of RPi machines not being able to do name resolution. However this doesn't sound like your problem, its that dhcp isn't setting the ip of the DNS server.

Now the problem is that arch has *two* ways of doing this, that kinda both work at the same time, but occasionally give race problems, that could be what you are having.

1) netctl + openresolv
2) systemd-networkd + systemd-resolved

So its worth trying just one in isolation, and I'd suggest the systemd approach as the new method. So make sure you have disabled netctl, and enable systemd-networkd and systemd-resolved. Note that enabling resolved will change /etc/resolv.conf so it is a link into /run/systemd/resolve/resolv.conf.

Then to make sure the network comes up create a file like /etc/systemd/network/usb0.network with:
$this->bbcode_second_pass_code('', '[Match]
Name=usb0

[Network]
DHCP=true')
Where you change usb0 into the name of your network interface (so what is shown in "ip a").

Say if you have problems with WPA.
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm


Return to General

Who is online

Users browsing this forum: Google [Bot] and 35 guests

cron