1

After an afternoon of trying to troubleshoot why one of my devices (a Beaglebone Black, distro is a Debian console) doesn't seem to resolve hostnames anymore, I realized I have absolutely no clue on how the networking works on linux. FWIW I am trying to do this on a system without windowmanager, through SSH (eth0) or USB (RNDIS).

Certainly, it can't be that difficult? I thought I knew how to set up everything:

  • Configuration of the interfaces goes in /etc/network/interfaces
  • You use ifup and ifdown to enable/disable the network interface
  • Then there's the networking service that seems to disable/control all interfaces

Well, no. Despite having a fixed ip set in /etc/networking/interfaces, sometimes I would get a DHCP assigned address. Rather annoying. I found out that the system had connman installed. Removing connman resulted in no more dhcp assigned addresses, unless specifically configured in /etc/network/interfaces.

But now I found that hostnames are no longer resolved:

systemd-resolve status

status: resolve call failed: All attempts to contact name servers or networks failed
  • Apart from the interfaces file, there's also /etc/systemd/network/eth0.network which seems to do the exact same thing
  • There's a configuration file in /etc/systemd/resolved.conf
  • Surfing to find answers to what could be wrong I seem to come up with a number of different methods for configuring and managing the network, multiple of them for systems that have a gui.
  • I found mention of other managers with configuration in other files (but managed to loose my notes so can't remember what they were)

How does this all work together (or doesn't it). How do I specify which "network manager" I want to use. What is the simplest option (for a CLI system)? If multiple are installed, which one gets chose? It is somewhat annoying to find seemingly helpful answers on forums, then find out it's likely/possibly not applicable for your system, but not being sure.

There's just so much information out there, it's hard to distil a basic overview to start from. "Linux networking" as a search term returns lots of pages, but apparently a lot has changed the last few years, so I'm not certain which one to take as a reference. Any pointers on where to start?

5
  • A lot of things have changed in how un*x systems are set up in the last few years--and a lot of unmaintained software packages are not being updated to handle the changes. You will need to be more specific about what you want to know, and include information about which system(s) are in use on your machine. As far as the resolver problem, though, what is in your /etc/nsswitch.conf ?
    – C. M.
    Commented Apr 21, 2021 at 15:14
  • You can still use the old ifup/down method, but most distros seem to install some network manager that insists on being in charge. One reason might be that ifup/ifdown is not a good tool for automatically handling changing network environments, such as for laptops that move around and use several wired and wireless networks. Your best bet is systemctl list-units -t service and disable everything that looks like a network manager. On Debian, I bet you either have NetworkManager and systemd-networkd. After that, you should be able to configure /etc/network/interfaces as in the old times. Commented Apr 23, 2021 at 1:31
  • By the way, NetworkManager is not a bad citizen. If it detects an interface configured in /etc/network/interfaces, it leaves it alone. I don't know it it's possible to tell systemd-networkd not to manage an interface. Commented Apr 23, 2021 at 1:34
  • @berndbausch Sorry, didn't receive notifications for this topic. Will certainly check on Monday, when I can access the device again (it is at work). I have nothing against any specific way of managing the interfaces, as long as I can understand what's going on... Commented Apr 24, 2021 at 9:40
  • @C.M.Likewise as above. Will check and update on Monday. Thanks! Commented Apr 24, 2021 at 9:41

1 Answer 1

0

You could use Gnome's NetworkManager it has quite a nice text interface nmtui or you could use its command line interface nmcli and its configuration is pretty basic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .