You are not logged in.

#1 2025-01-04 17:19:01

StopkaPeter
Member
From: Slovakia
Registered: 2019-05-20
Posts: 31

Choosing the Right Network Manager and Its Configuration

Hello, I need advice on which network manager to choose and how to configure it properly. From the documentation, I learned that there are currently several options for managing Ethernet, wireless, DHCP, and DNS: ConnMan, NetworkManager, IWD, and systemd-networkd. I am most inclined toward NetworkManager, but please correct me if another option is currently better.

If I choose this route, I understand I need to install the networkmanager package. For wireless, I can choose between iwd and wpa_supplicant; I lean toward wpa_supplicant for its simplicity. Regarding DHCP management, the options are dhclient (no longer maintained), dhcpcd, or the internal DHCP of NetworkManager. Installing dhcpcd seems unnecessary unless it has advantages over NetworkManager’s internal DHCP, so I would choose the internal option.

For DNS, there are several options: none (using the router/ISP), internal management via /etc/resolv.conf, systemd-resolved, or openresolv. I’m not familiar with any significant advantages among these (e.g., speed, caching), so I lean toward simplicity—using either none (router) or the internal DNS managed by NetworkManager, avoiding the need to install openresolv or systemd-resolved.

Regarding configuration, I initially thought it would be simpler, but I discovered settings such as NetworkManager’s default communication with systemd-resolved. For this, the following configuration is needed:

Steps I would follow:

  1. Install the required packages:

    pacman -Sy networkmanager
    pacman -Sy wpa_supplicant
  2. Disable unnecessary services:

    systemctl disable --now systemd-networkd
    systemctl disable --now systemd-resolved

    Some configurations mention masking services (e.g., systemd-networkd or systemd-resolved) to avoid conflicts. Should I use masking, or is disabling sufficient?

  3. Configure NetworkManager:

    • Disable systemd-resolved:

      /etc/NetworkManager/conf.d/no-systemd-resolved.conf
      [main]
      systemd-resolved=false
    • Use NetworkManager’s internal DHCP:

      /etc/NetworkManager/conf.d/dhcp.conf
      [main]
      dhcp=internal
    • Configure DNS:

      /etc/NetworkManager/conf.d/dns.conf
      [main]
      dns=none
      # Internal DNS
      # dns=default
  4. Enable and start NetworkManager:

    systemctl enable --now NetworkManager

Question about symlink for resolv.conf:
If I decide to use NetworkManager’s internal DNS, should I also create a symlink for /etc/resolv.conf?

Offline

#2 2025-01-04 18:03:32

cryptearth
Member
Registered: 2024-02-03
Posts: 2,159

Re: Choosing the Right Network Manager and Its Configuration

although I may no direct help: on my main game system I use systemd-networkd/-resolved and have resolv.conf symlinked to /run/systemd/resolve/resolv.conf which uses the dns stub of my ISPs router obtained via dhcp
reason: I use VMs and systemd provides a simple option to setup network bridges
on my laptop however I use networkmanager and plasma nm-applet without anything else but let networkmanager do all the magic - just because to me its the simplest way to deal with connecting to wifi while also the same convenience just plugging in a lan cable to good to go
there'Re several options and setups and it comes down to personal preference - like dns using isp router vs having a local resolver because of dnssec and privacy (which I don't care about - but some people do)
I doubt there's some objective best option - more like: here're the several pros and cons - it depends on you which you chose

Offline

#3 2025-01-04 18:37:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,194

Re: Choosing the Right Network Manager and Its Configuration

Networkmanager will create and configure /etc/resolv.conf with it's own logic if it's not a symlink and you have NMs DNS handling enabled.

Offline

#4 2025-01-04 18:40:46

libertepourmoi
Member
Registered: 2022-03-26
Posts: 16

Re: Choosing the Right Network Manager and Its Configuration

Re your question on /etc/resolv.conf: for NM's internal DNS mode, NM should just write to that file.

But with your config, you are not using the internal mode, since you are setting dns=none. In that case you have to write the file yourself. See

 man 5 NetworkManager.conf 

or https://man.archlinux.org/man/extra/net … .conf.5.en for an explanation of the modes.

Offline

Board footer

Powered by FluxBB