Hello Mike and list,

On Thu, Feb 24, 2011 at 11:03:18AM +0100, Mike Gabriel wrote:
> Hi Klaus,
> 
> Am Donnerstag, 24. Februar 2011, 00:37:45 schrieb Klaus Knopper:
> > Hi all,
> > 
> > However, I found that another way of avoiding conflicts between
> > NetworkManager and ifup/ifdown is possible by just making NetworkManager
> > aware of everything preconfigured in /etc/network/interfaces, and
> > actually using this file for NetworkManagers configuration handling, by
> > setting:
> > 
> > [main]
> > plugins=ifupdown,keyfile
> > 
> > [ifupdown]
> > managed=true
> 
> I haven't know these before... This sounds handy.
>  
> My default network manager configuration though only gets activated after 
> user 
> login. Does a nm configuration as you propose enable network before the user 
> logs in?

The short answer is "yes". :-)

There are several (mostly underdocumented) ways to let networkmanager
configure the network. The best known one is communication between a
graphical frontend (such as nm-applet for GTK and knetworkmanager for
KDE), both exchanging information with networkmanager via dbus+hal. That
is the one you mentioned: nm-applet will open a socket to networkmanager
once the user logs in, and tell networkmanager which of the
user-configured profiles to use, depending on the current network state
and environment. When just using this scenario, NetworkManager won't do
anything before you start the graphical desktop.

The lesser known way, the "non-interactive" mode, is networkmanagers
internal "system-settings" service, which was a standalone program in
networkmanager versions before 0.7-something, and now is integrated
directly in networkmanager. You can put configuration files in
/etc/NetworkManager/system-connections/ (one file for each connection,
in a very networkmanager-specific syntax), or let networkmanager read
/etc/network/interfaces via the "ifupdown" plugin as mentioned above.
These methods work entirely without a graphical GUI; I use this mode for
configuring the network on the Audio/Textconsole based ADRIANE desktop.
An advantage of using networkmanager with if ifupdown is that it will
still react to connectivity changes immediately (provided there are
different alternative connections given in /etc/network/interfaces, such
as WLAN and LAN), when plugging in a LAN cable, detecting a previously
configured WLAN essid and similar.

Actually, there is no better textual interface for networkmanager known
to me other than the ifup plugin and /etc/network/interfaces. Probably,
you can also send configuration commands to networkmanager via dbus, and
there is a "cnetworkmanager" script floating around that will do this,
but for me, editing /etc/network/interfaces for use with networkmanager
seems to be the easier way.

Another advantage of using networkmanager is that it is easily visible
for the user from the nm-applet icon in the graphical desktop, whether
or not the client has a working network connection. Well, probably not a
big help in skolelinux, since you won't even be able to login when
Tjener is unreachable. ;-)

> So basically, the point about network manager is: do we need network access 
> before the user logs (YES: for NFS etc.) and how can this be handled by 
> network manager...

Again, yes, networkmanager will handle this without a user logged in,
with its "system-settings" part, either via /etc/network/interfaces via
managed=yes, or with an ifup/ifdown-independent configuration file in
/etc/NetworkManager/system-settings/. To reload networkmanager after a
change to /etc/network/interfaces, in older versions you had to kill the
"nm-system-settings" process (which then respawned from networkmanager),
and /etc/init.d/network-manager reload in newer versions.

One thing that can cause problems occurs when mixing manual calls to
ifup/ifdown when networkmanager is already handling devices, or
configuring wpa_supplicant manually outside of /etc/network/interfaces,
when networkmanager already has started wpa_supplicant with the settings
known from the non-interactive configuration.

I'm not casting a vote for or against keeping networkmanager here,
either method will work, just wanted to point out that non-interactive
configuration is indeed possible with networkmanager.

Regards
Klaus


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110224112904.gg26...@knopper.net

Reply via email to