1

This is Debian Buster. I need NetworkManager in order to run OpenShift.

My main interface is plugged in a Linuxbridge br1, which is configured in /etc/network/interfaces:

auto br1
iface br1 inet static
bridge_ports eno1
address 192.168.1.27
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.16, 1.1.1.1

According to the documentation, NetworkManager should leave br1 alone. When I installed NetworkManager, a message to this effect was even displayed. However, br1 is managed by NM. I can probably live with this, but wonder why documentation and reality differ.

Next, NM sets the nameserver in /etc/resolv.conf to 127.0.0.1. I tried to change that with nmcli c mod br1 ipv4.dns 192.168.1.16. The journal confirms using nameserver 192.168.1.16#53(via br1), but /etc/resolv.conf is still set to 127.0.0.1. I also set dns=none in /etc/NetworkManager/NetworkManager.conf, but to no avail. Yes, I did restart the service.

Any tips what I should do to correctly set the nameserver, and convince NetworkManager that it should not manage the bridge?

2
  • A part of my answer there is about telling NM to ignore an interface: unix.stackexchange.com/questions/605789/… . Can't tell if this will help for DNS though.
    – A.B
    Jul 4 '21 at 15:31
  • @A.B Thanks, that helped with part of my problem. As you see from my answer, I also managed to somehow fix the DNS part. Jul 5 '21 at 2:06
0

My main problem was with name resolution, and one solution would be making /etc/resolv.conf immutable. I did not have to go that far, since NetworkManager doesn't seem to touch /etc/resolv.conf anymore after a reboot.

Thanks to user @A.B, I unmanaged br1 by declaring it in /etc/NetworkManager/NetworkManager.conf. Before that, I ran nmcli dev set br1 managed no without any effect. Initially, I was worried by this remark in the manual page for NetworkManager.conf:

NetworkManager controls the default route, so because the interface is ignored, NetworkManager may assign the default route to some other interface

However, the default route is set correctly (as configured in /etc/network/interfaces).

None of that improves my opinion about NetworkManager and its impenetrable logic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.