You are not logged in.

#1 2016-01-07 18:23:50

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Systemd-networkd.service with New Release

Hey everyone, I'm just curious as to why / why not, the  systemd-networkd.service and systemd-resolved.service are not loaded and active from the start?  Is it possible in the next release to give an option on the startup script rather the user wants to use the older /etc/resolv.conf or the newer systemd-resolved.service?


Sub question, what's the name of the network suite that is running by default in Debian/B.L? It's obviously not systemd.networkd since it's not running by default.


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#2 2016-01-07 18:33:41

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Systemd-networkd.service with New Release

BunsenLabs just uses NetworkManager for all connections.

I would push for systemd-networkd with BL but the /etc/network/interfaces file and ifupdown are generally preferred by the traditionally conservative Debian community.

If you want to switch to systemd-networkd, I have a quick guide covering basic connections here:
https://forums.bunsenlabs.org/viewtopic.php?id=546

The only real problem with using it in Debian with wireless connections is that it requires an interface-specific version of wpa_supplicant.service to be running to integrate properly with systemd -- you can see an example of this in my linked guide wink


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2016-01-07 20:14:39

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Systemd-networkd.service with New Release

Head_on_a_Stick wrote:

BunsenLabs just uses NetworkManager for all connections.

I would push for systemd-networkd with BL but the /etc/network/interfaces file and ifupdown are generally preferred by the traditionally conservative Debian community.

If you want to switch to systemd-networkd, I have a quick guide covering basic connections here:
https://forums.bunsenlabs.org/viewtopic.php?id=546

The only real problem with using it in Debian with wireless connections is that it requires an interface-specific version of wpa_supplicant.service to be running to integrate properly with systemd -- you can see an example of this in my linked guide wink

Ah that makes sense I suppose. Darn those conservative Debianiers!   tongue   Thanks HoaS! I was wondering why the hesitation to adopt to a pure networkd config. Thanks for your guide though, I'll try it tonight!


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#4 2016-01-07 21:35:28

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Systemd-networkd.service with New Release

Hmm are you sure that NetworkManager is the default? 

None of the commands are available, or seem to be installed.

NetworkManager

Is NetworkManager a wrapper for something deeper? Because as of now, I haven't enabled systemd-networkd.service, nor does NetworkManager seem to be installed. none of the iface, ifup, ifdown.

It does however have the ip command suite (ip list, ip list, ip add etc...)

Is this setup sort of like a hacked together version of systemd's and networkmanager?


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#5 2016-01-07 21:54:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Systemd-networkd.service with New Release

Horizon_Brave wrote:

are you sure that NetworkManager is the default?

Pretty much, yeah.

The network systray icon is for nm-applet so as long as that's working then that's what you're using wink

Please post the output of:

apt-cache policy network-manager
systemctl list-unit-files|grep NetworkManager

EDIT: `if{up,down}` operates via /etc/network/interfaces rather than NetworkManager.

See interfaces(5)

Last edited by Head_on_a_Stick (2016-01-07 21:55:30)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2016-01-07 21:55:47

hhh
Meep!
Registered: 2015-09-17
Posts: 9,046
Website

Re: Systemd-networkd.service with New Release

^The packages are network-manager and network-manager-gnome but the panel applet gets run with the command...

nm-applet &

The applet is started by that command during BL session startup in /etc/xdg/autostart/nm-applet.desktop

Offline

#7 2016-01-07 22:00:50

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Systemd-networkd.service with New Release

Just to clarify here: NetworkManager is a cover-all solution that is used in BunsenLabs by default primarily to cover laptop users.

For desktop users with a simple, fixed ethernet connection, it would be possible (preferable even) to use /etc/network/interfaces or systemd-networkd with no set up but a roaming connection would require user-specific modification of text files.

It's probably not reasonable to expect BLabbers to open $EDITOR and reload the systemd daemons every time they want to connect in an internet cafe.

EDIT: Although this would, of course, be my preference...
devil

Last edited by Head_on_a_Stick (2016-01-07 22:01:48)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#8 2016-01-07 22:09:27

hhh
Meep!
Registered: 2015-09-17
Posts: 9,046
Website

Re: Systemd-networkd.service with New Release

it should be mentioned that through our backports we now offer ceni, an ncurses (terminal) interface for configuring /etc/network/interfaces on the fly. To quote Monty Python, "Oh yes, it's-uh very nice-uh."

Offline

#9 2016-01-08 18:41:31

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Systemd-networkd.service with New Release

Head_on_a_Stick wrote:
Horizon_Brave wrote:

are you sure that NetworkManager is the default?

Please post the output of:

apt-cache policy network-manager
systemctl list-unit-files|grep NetworkManager
root@bunsen:/etc/network# apt-cache policy network-manager
network-manager:
   Installed: (none)
   Candidate: 0.9.10.0-7
   Version table:
        0.9.10.0-7 0
              500 ftp://ftp.us.debian.org/debian/ jessie/main amd64 Packages

And:

root@bunsen:/etc/network# systemctl list-unit-files |grep NetworkManager
root@bunsen:/etc/network#

Is this output normal? I'm running a 'naked' install of openbox. No display manager, or anything. Literally installed and ran openbox on boot.



Ah, okay, I think I found the answer actually. I was confusing three different "pieces".

NetworkManager, the ip and if command suites, and the /etc/network/interfaces

So NetworkManager is more of a front-end graphical manager for presenting networking  configs. It helps keep the networking connections up and running.  The config that I was testing this out of, is just running a barebones openbox install with no disply manager. So this is probably why NetworkManager isn't really running?

Ifconfig and ip addr  both work on this setup. These are for ip address and network configuration assigning.This is done per interface...

The ifup and ifdown commands are more 'wrappers' for the ifconfig command. They also source the /etc/network/interfaces  file.

The /etc/network/interfaces files is what ifup and ifdown use to quickly provision certain interfaces based on the options like allow, auto, and mapping etc... 

It doesn't look like the nm-applet is installed either, this is also probably because I'm just running openbox minimum.

One question though... there is a source /etc/network/interfaces.d/*  line in this file..but That directory is completely empty. What would / should be in this directory? Is this source command run each every single time ifup and ifdown are run?

Last edited by Horizon_Brave (2016-01-08 18:43:00)


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#10 2016-01-08 19:46:20

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: Systemd-networkd.service with New Release

One question though... there is a source /etc/network/interfaces.d/*  line in this file..but That directory is completely empty. What would / should be in this directory? Is this source command run each every single time ifup and ifdown are run?

That directory is there so that other packages can drop scripts into it, that then can be run when you issue an ifup or ifdown command.

For example, if you install openvpn, the openvpn installation will drop some scripts in there.

Offline

#11 2016-01-08 20:52:35

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Systemd-networkd.service with New Release

xaos52 wrote:

One question though... there is a source /etc/network/interfaces.d/*  line in this file..but That directory is completely empty. What would / should be in this directory? Is this source command run each every single time ifup and ifdown are run?

That directory is there so that other packages can drop scripts into it, that then can be run when you issue an ifup or ifdown command.

For example, if you install openvpn, the openvpn installation will drop some scripts in there.


Right! Makes sense for it to keep something open for other files.

So would anyone know if NetworkManager is sort of relying on a GUI or xsession to be open?  I just find it odd that I have none running or installed on the setup that isn't running the display manager


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#12 2016-01-08 21:07:33

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: Systemd-networkd.service with New Release

NetworkManager has pretty tight integration with systemd now. The thing about /etc/network/interfaces, is that while it is fairly easy to setup, it does block boot, meaning it is not designed for parallelized startups. In this day and age when 6s boots are the norm, 30s to hook up the network can be an eternity.

Pottering has stated that systemd.networkd was not really designed for mobile profiles, nor does he intend to make it so. He recommends NetworkManager in that case. Given that it is all originating from the same camp, it is easy to see why he has taken that approach.

/etc/network/interfaces is great when building up systems and you need to get a network connection built up fairly quickly from the command line. Eventually, I will get around to giving another go at @HoaS's walkthroughs on the subject. However, once I get done remodeling this house I am working on and get moved into it, I plan to redo my entire network infrastructure. So, that intent keeps getting pushed onto the back burner, knowing that soon my desktops, my NAS, and the tv will all end up hardwired and only the truly mobile stuff will end up using wifi.

Offline

#13 2016-01-09 09:10:09

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Systemd-networkd.service with New Release

To be clear here: NetworkManager is absolutely *not* needed at all.

@HB: If you just have a fixed ethernet connection, all that is needed is to assign the addresses to the connection using ip(8), for example:

ip addr add 192.168.1.23/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.254

Once this is done, no further programs need to be active to handle the connection.

For wireless connections, the passkey must be exchanged first before the addresses are assigned.

This is done by wpa_supplicant(8)

If NetworkManager is installed and enabled (either with systemctl(1) or through the XDG autostart specification), then that will be using these low-level tools to control the connection.

Most users prefer the convenience of a graphical network manager but it is far from necessary, I never use NetworkManager even for roaming connections.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#14 2016-01-09 15:19:15

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Systemd-networkd.service with New Release

Head_on_a_Stick wrote:

To be clear here: NetworkManager is absolutely *not* needed at all.

@HB: If you just have a fixed ethernet connection, all that is needed is to assign the addresses to the connection using ip(8), for example:

ip addr add 192.168.1.23/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.254

Once this is done, no further programs need to be active to handle the connection.

For wireless connections, the passkey must be exchanged first before the addresses are assigned.

This is done by wpa_supplicant(8)

If NetworkManager is installed and enabled (either with systemctl(1) or through the XDG autostart specification), then that will be using these low-level tools to control the connection.

Most users prefer the convenience of a graphical network manager but it is far from necessary, I never use NetworkManager even for roaming connections.


Thank you Ser! Case closed in my curiosity!


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

Board footer

Powered by FluxBB