Thanks for your wonderful reply, Rahul.

I should have written down what a system plugin for NM can do.

I am using NM for wireless and vpn connection in Gentoo, it runs well as in Ubuntu Live-CD.

NM has a Client/Server architecture, a server daemon runs in the background, and a client such as the nm-applet for GNOME keeping and providing connection information. it is easy to write a client for specified wm, knetworkmanager for KDE and cnetworkmanager for console are already in the Portage. A client needs to store settings for the connection, for example, nm-applet stores the settings using gconf. A sytem integrated plugin indeed is another client integrated into NM's daemon and keeping the connection, it read and write from the system's network configuration files, converting them to settings information for NM. Thus, without settings from end user, the computer is able to connect the internet using system's default settings. Also, the user can easily change the system settings via an UI editor, if gained the privilege.

So NM is already provide end users with a straight forward way of managing their network connections, the aim of the integration project is to make NM more closed with Gentoo, so that we can start the network connection configured in /etc/conf.d/net at system boot time running "/etc/init.d/NetworkManager start" instead of  "/etc/init.d/net.<interface> start".

My opinion is that the modular networking configuration mechanism(modules implemented in /lib/rc/net/<module>.sh) and week security wireless configuration(mainly rely on  wpa_supplicant's configuration) in /etc/conf.d/net, stop third party to implement another daemon for system network, including plugin for NM.

Actually, there is a new network script in openrc, /etc/init.d/network, but the configuration is also more for network scripts then connection settings.



On Tue, Apr 6, 2010 at 6:01 PM, Rahul Jain <rahul@schmizz.net> wrote:
On Tuesday 06 April 2010 11:33:25 Zhitong He wrote:
> Hi, I have been trying to get involved with NetworkManager's integration
> with Gentoo, but encounter some problems.
>
> 1. What network configuration in Gentoo does are not what NM can do.
>     Modular Networking in Gentoo is popular, however, they are not all
> supported by NM. For example, bonding, bridging and vlan. In addition,
> advanced configuration such as interface dependency, fall back operation,
> are not supported by NM, too.
>

The major advantage of NM (as is often cited) is the fact that it provides a
unified UI for managing wired(Ethernet, DSL, PPP), wireless and vpn
connections. It allows automatic reconnection on network loss, allows you to
automatically connect to a preferred wireless network (if found) and allows
hotplugging of the ethernet cable. Conventionally speaking, these tasks would
take care of the networking needs of a vast majority of end users. Bonding,
bridging and others are advanced networking tasks that one does not expect a
"normal" user to perform on a day to day basis.
So, the only advantage of NM is that gives you a sane UI to perform your day
to day networking tasks. 
 
> 2. Configuration about Wireless Networking is not powerful enough.
>     Security wireless connection is a strong point of NM, however, not the
> network configuration of Gentoo. Though we can choose  wpa_supplicant
> module for security connection, the configuration depends on
> wpa_supplicant's configuration files which has its own syntax and not
> worth translation back to NM using plugin, since NM is already working
> with wpa_supplicant via dbus communication.
>

I have not used NM for quite a long time (I use WICD for managing my internet
connections) but as far as I know (and understand your question) the end user
does not need to write config files by hand for managing wireless networks in
NM. I recently did try the Ubuntu Live CD (the Ubuntu folks do a great job of
integrating NM) and NM was able to connect to the encrypted Uni network after
I provided it with the username and password. For WICD, I had to create a
template using the provided wpa_supplicant file. I think it might be helpful
for you to look into what Ubuntu does in this regard.

> So, what's the benefit for Gentoo and  what I can do if choosing the
> project?
> Working with syntax in network configuration file like config_<interface>
> and config_<essid>  is  pleasure, but is that enough? they are only little
> part of Gentoo's network configuration file. The work should focus on
> settings for NM, but settings in Gentoo's network configuration rely on
> various tools according to different modules and the syntax is not unified.
> Will mentor let me pass the final evaluation if only part of the
> configuration is support?  :-)
>

As far as I know, there are already two methods of managing networks in
gentoo. Those using openrc already do things a little differently than those
who are not. (Please correct me if I am mistaken). The main advantage for
gentoo would be to provide end users with a straight forward way of managing
their network connections.

>  My conclusion is that we should do more work on improving the way to
> configure network in Gentoo instead of NM integration, if we need to make
> it easily supported by various network control daemon. For example, focus
> on settings for variable control like /etc/make.conf instead of syntax as
> wpa_supplicant_wlan0="-Dwext", put it from a single file(/etc/conf.d/net)
> to a specified directory, where we can also place the vpn keys, pem
> files..
>

This is indeed a good idea. I am not qualified to comment on what needs to be
achieved as part of GSoc project but I think any major steps to improve
network management in gentoo would be welcome by all.  I am no fan of NM so my
views might be a little bit coloured in this regard, but even then I still
think that due to the popularity of NM it would be a good idea to have it
integrated into Gentoo. Maybe you could also look into making it gnome-
independent (or kde-independent in the case of knetworkmanager) so that it can
be used as a networking tool by people using other WMs/DMs as well.

> Sorry for my poor English, I would explain further if you could not
> understand my opinion. Feedback and comments are welcome.

I hope I might be able to answer some of your questions, I am no expert
myself. :)

Cheers
Rahul
--
M.Sc. Computer Science
ETH Zürich
Switzerland



--
Zhitong He
Sun Yat-sen University