LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 05-30-2020, 07:52 AM   #1
platypo
Member
 
Registered: Sep 2015
Distribution: Debian, Archlinux
Posts: 140

Rep: Reputation: Disabled
Name resolution with Networkmanager


I am running Archlinux-ARM Version 5.4.40-1-ARCH #1 SMP PREEMPT on a Raspberry Pi and i seem to have issues with name resolution. Sometimes it takes very long to resolve a name, sometimes it only works on a second attempt and sometimes it fails.

I recently tried to get networking mostly to be managed by NetworkManager. So the only "networking-relevant" services actively running are

iptables.service
NetworkManager.service
systemd-resolved.service
wpa-supplicant.service

I don't know how to set up dns-resolution properly. I can either edit dns-settings via 'nmtui' respectively 'nmcli', wich are currently set to 'Automatic' or i can use resolvectl. /etc/systemd/resolved.conf currently points to my gateway/isp-router and 8.8.8.8 as fallback server, along with the Options 'LLMNR', 'DNSSec' and 'DNSStubListener' set to 'no'.
Does NetworkManager rely on systemd-resolved and if so what would be the proper settings? Can nameresolution also be managed by NetworkManager only?

Edit: i'm sorry i was so caught up with the issue that i completely forgot about the archlinux.org wiki-page. It gives clear instructions on the NetworkManager-site. I'll mark this thread as solved as soon as i figured this out.

Last edited by platypo; 05-30-2020 at 08:02 AM.
 
Old 05-31-2020, 03:23 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by platypo View Post
iptables.service
NetworkManager.service
systemd-resolved.service
wpa-supplicant.service
Please __disable__ the last two - networkmanager should take care of everything.

Quote:
I don't know how to set up dns-resolution properly. I can either edit dns-settings via 'nmtui' respectively 'nmcli', wich are currently set to 'Automatic' or i can use resolvectl.
Once again: if you use NetworkManager, use NetworkManager.

Quote:
Does NetworkManager rely on systemd-resolved
No.

Quote:
Edit: i'm sorry i was so caught up with the issue that i completely forgot about the archlinux.org wiki-page. It gives clear instructions on the NetworkManager-site. I'll mark this thread as solved as soon as i figured this out.
aaww, cripes. 5 minutes for nothing.
 
Old 06-05-2020, 09:40 AM   #3
platypo
Member
 
Registered: Sep 2015
Distribution: Debian, Archlinux
Posts: 140

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Please __disable__ the last two - networkmanager should take care of everything.


Once again: if you use NetworkManager, use NetworkManager.


No.


aaww, cripes. 5 minutes for nothing.
Wait a second. It says here that NetworkManager can be (or has to be?) configured to use systemd-resovled respectively dnsmasq. Doesn't that imply that the service has to be up and running (as it says in the link)?

Anyway, thanks for your time
 
Old 06-14-2020, 02:22 PM   #4
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Rep: Reputation: Disabled
You can repackage Network Manager to use openresolv. Check the Wiki regarding openresolv vs systemd-resolved.
Here is a build for using openresolv, this build does other things too like disable bluetooth and removes cloud and might not work for wifi (meant for hardwired network):
Code:
# Maintainer:
# Maintainer:
# Contributor:
# Contributor:
# Contributor:
# Contributor:

pkgbase=networkmanager
pkgname=(networkmanager libnm)
pkgver=1.24.2
pkgrel=1
pkgdesc="Network connection manager and user applications"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch=(x86_64)
license=(GPL2 LGPL2.1)
_pppver=2.4.7
makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver"
             iproute2 nss polkit wpa_supplicant curl systemd libmm-glib
             libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs
             glib2-docs dnsmasq openresolv libpsl audit meson)
checkdepends=(libx11 python-dbus)
_commit=972453d7352e92f4f988e00d6f43636835a1ae91  # tags/1.24.2^0
source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd NetworkManager
  git describe | sed 's/-dev/dev/;s/-rc/rc/;s/-/+/g'
}

prepare() {
  cd NetworkManager
}

build() {
  local meson_args=(
    # system paths
    -D dbus_conf_dir=/usr/share/dbus-1/system.d

    # platform
    -D dist_version="$pkgver-$pkgrel"
    -D session_tracking_consolekit=false
    -D suspend_resume=systemd
    -D modify_system=true
    -D polkit_agent=true
    -D selinux=false

    # features
    -D iwd=false
    -D pppd_plugin_dir=/usr/lib/pppd/$_pppver
    -D teamdctl=true
    -D bluez5_dun=false
    -D ebpf=true

    # configuration plugins
    -D config_plugins_default=keyfile

    # dhcp clients
    -D dhcpcd=no

    # miscellaneous
    -D vapi=true
    -D docs=true
    -D more_asserts=no
    -D more_logging=false
    -D qt=false
  )

  arch-meson NetworkManager build "${meson_args[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

package_networkmanager() {
  depends=(libnm iproute2 polkit wpa_supplicant libmm-glib libnewt libndp libteam curl
           libpsl audit mobile-broadband-provider-info)
  optdepends=('dnsmasq: connection sharing'
              'bluez: Bluetooth support'
              'bluez-libs: bluetooth support'
              'ppp: dialup connection support'
              'modemmanager: cellular network support'
              'iwd: wpa_supplicant alternative'
              'dhclient: alternative DHCP client'
              'openresolv: alternative resolv.conf manager'
              'firewalld: Firewall support')
  backup=(etc/NetworkManager/NetworkManager.conf)
  groups=('gnome'
          'modified')

  DESTDIR="$pkgdir" meson install -C build

  # /etc/NetworkManager
  install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d
  install -dm700 "$pkgdir/etc/NetworkManager/system-connections"
  install -m644 /dev/stdin "$pkgdir/etc/NetworkManager/NetworkManager.conf" <<END
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
END

  # packaged configuration
  install -Dm644 /dev/stdin "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" <<END
[connectivity]
uri=http://www.archlinux.org/check_network_status.txt
END

  shopt -s globstar

  _pick libnm "$pkgdir"/usr/include/libnm
  _pick libnm "$pkgdir"/usr/lib/girepository-1.0/NM-*
  _pick libnm "$pkgdir"/usr/lib/libnm.*
  _pick libnm "$pkgdir"/usr/lib/pkgconfig/libnm.pc
  _pick libnm "$pkgdir"/usr/share/gir-1.0/NM-*
  _pick libnm "$pkgdir"/usr/share/gtk-doc/html/libnm
  _pick libnm "$pkgdir"/usr/share/vala/vapi/libnm.*

}

package_libnm() {
  pkgdesc="NetworkManager client library"
  depends=(glib2 nss libutil-linux jansson systemd-libs)
  provides=(libnm.so)

  mv libnm/* "$pkgdir"
}

# vim:set sw=2 et:
Diff it to the one in the Arch repos to see what is actually changed
 
Old 09-06-2020, 04:10 AM   #5
platypo
Member
 
Registered: Sep 2015
Distribution: Debian, Archlinux
Posts: 140

Original Poster
Rep: Reputation: Disabled
It took me a while to figure this out. After disabling systemd-resolved.service and removing the link /etc/resolv.conf created by systemd-resolved Networkmanager configured with dnsmasq created /etc/resolv.conf properly and name resolution works well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I can't manage NetworkManager via /etc/rc.d/rc.networkmanager script igadoter Slackware 20 03-22-2018 03:17 PM
"Name resolution failure"-- but already using IP address, there is no name to resolve firejuggler86 Linux - Networking 1 05-14-2017 02:12 AM
Name to IP resolution works but not IP to name brandon@rhiamet.com Linux - Server 3 02-18-2009 04:45 PM
Telnet : Temporary failure in name resolution : Host name lookup failure koodoo Linux - Newbie 10 02-11-2008 07:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration