Gentoo Archives: gentoo-soc

From: Zhitong He <hezhit@×××××.com>
To: Rahul Jain <rahul@×××××××.net>
Cc: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Network Configuration in Gentoo
Date: Tue, 06 Apr 2010 11:36:57
Message-Id: y2sf87449c71004060436i4708c146l1de181e2a93c9582@mail.gmail.com
In Reply to: Re: [gentoo-soc] Network Configuration in Gentoo by Rahul Jain
1 Thanks for your wonderful reply, Rahul.
2
3 I should have written down what a system plugin for NM can do.
4
5 I am using NM for wireless and vpn connection in Gentoo, it runs well as in
6 Ubuntu Live-CD.
7
8 NM has a Client/Server architecture, a server daemon runs in the background,
9 and a client such as the nm-applet for GNOME keeping and providing
10 connection information. it is easy to write a client for specified wm,
11 knetworkmanager for KDE and cnetworkmanager for console are already in the
12 Portage. A client needs to store settings for the connection, for example,
13 nm-applet stores the settings using gconf. A sytem integrated plugin indeed
14 is another client integrated into NM's daemon and keeping the connection, it
15 read and write from the system's network configuration files, converting
16 them to settings information for NM. Thus, without settings from end user,
17 the computer is able to connect the internet using system's default
18 settings. Also, the user can easily change the system settings via an UI
19 editor, if gained the privilege.
20
21 So NM is already provide end users with a straight forward way of
22 managing their network connections, the aim of the integration project is to
23 make NM more closed with Gentoo, so that we can start the network connection
24 configured in /etc/conf.d/net at system boot time running
25 "/etc/init.d/NetworkManager start" instead of "/etc/init.d/net.<interface>
26 start".
27
28 My opinion is that the modular networking configuration mechanism(modules
29 implemented in /lib/rc/net/<module>.sh) and week security wireless
30 configuration(mainly rely on wpa_supplicant's configuration) in
31 /etc/conf.d/net, stop third party to implement another daemon for system
32 network, including plugin for NM.
33
34 Actually, there is a new network script in openrc, /etc/init.d/network, but
35 the configuration is also more for network scripts then connection settings.
36
37
38
39 On Tue, Apr 6, 2010 at 6:01 PM, Rahul Jain <rahul@×××××××.net> wrote:
40
41 > On Tuesday 06 April 2010 11:33:25 Zhitong He wrote:
42 > > Hi, I have been trying to get involved with NetworkManager's integration
43 > > with Gentoo, but encounter some problems.
44 > >
45 > > 1. What network configuration in Gentoo does are not what NM can do.
46 > > Modular Networking in Gentoo is popular, however, they are not all
47 > > supported by NM. For example, bonding, bridging and vlan. In addition,
48 > > advanced configuration such as interface dependency, fall back operation,
49 > > are not supported by NM, too.
50 > >
51 >
52 > The major advantage of NM (as is often cited) is the fact that it provides
53 > a
54 > unified UI for managing wired(Ethernet, DSL, PPP), wireless and vpn
55 > connections. It allows automatic reconnection on network loss, allows you
56 > to
57 > automatically connect to a preferred wireless network (if found) and allows
58 > hotplugging of the ethernet cable. Conventionally speaking, these tasks
59 > would
60 > take care of the networking needs of a vast majority of end users. Bonding,
61 > bridging and others are advanced networking tasks that one does not expect
62 > a
63 > "normal" user to perform on a day to day basis.
64 > So, the only advantage of NM is that gives you a sane UI to perform your
65 > day
66 > to day networking tasks.
67
68
69 >
70 > 2. Configuration about Wireless Networking is not powerful enough.
71 > > Security wireless connection is a strong point of NM, however, not
72 > the
73 > > network configuration of Gentoo. Though we can choose wpa_supplicant
74 > > module for security connection, the configuration depends on
75 > > wpa_supplicant's configuration files which has its own syntax and not
76 > > worth translation back to NM using plugin, since NM is already working
77 > > with wpa_supplicant via dbus communication.
78 > >
79 >
80 > I have not used NM for quite a long time (I use WICD for managing my
81 > internet
82 > connections) but as far as I know (and understand your question) the end
83 > user
84 > does not need to write config files by hand for managing wireless networks
85 > in
86 > NM. I recently did try the Ubuntu Live CD (the Ubuntu folks do a great job
87 > of
88 > integrating NM) and NM was able to connect to the encrypted Uni network
89 > after
90 > I provided it with the username and password. For WICD, I had to create a
91 > template using the provided wpa_supplicant file. I think it might be
92 > helpful
93 > for you to look into what Ubuntu does in this regard.
94 >
95 > > So, what's the benefit for Gentoo and what I can do if choosing the
96 > > project?
97 > > Working with syntax in network configuration file like config_<interface>
98 > > and config_<essid> is pleasure, but is that enough? they are only
99 > little
100 > > part of Gentoo's network configuration file. The work should focus on
101 > > settings for NM, but settings in Gentoo's network configuration rely on
102 > > various tools according to different modules and the syntax is not
103 > unified.
104 > > Will mentor let me pass the final evaluation if only part of the
105 > > configuration is support? :-)
106 > >
107 >
108 > As far as I know, there are already two methods of managing networks in
109 > gentoo. Those using openrc already do things a little differently than
110 > those
111 > who are not. (Please correct me if I am mistaken). The main advantage for
112 > gentoo would be to provide end users with a straight forward way of
113 > managing
114 > their network connections.
115 >
116 > > My conclusion is that we should do more work on improving the way to
117 > > configure network in Gentoo instead of NM integration, if we need to make
118 > > it easily supported by various network control daemon. For example, focus
119 > > on settings for variable control like /etc/make.conf instead of syntax as
120 > > wpa_supplicant_wlan0="-Dwext", put it from a single file(/etc/conf.d/net)
121 > > to a specified directory, where we can also place the vpn keys, pem
122 > > files..
123 > >
124 >
125 > This is indeed a good idea. I am not qualified to comment on what needs to
126 > be
127 > achieved as part of GSoc project but I think any major steps to improve
128 > network management in gentoo would be welcome by all. I am no fan of NM so
129 > my
130 > views might be a little bit coloured in this regard, but even then I still
131 > think that due to the popularity of NM it would be a good idea to have it
132 > integrated into Gentoo. Maybe you could also look into making it gnome-
133 > independent (or kde-independent in the case of knetworkmanager) so that it
134 > can
135 > be used as a networking tool by people using other WMs/DMs as well.
136 >
137 > > Sorry for my poor English, I would explain further if you could not
138 > > understand my opinion. Feedback and comments are welcome.
139 >
140 > I hope I might be able to answer some of your questions, I am no expert
141 > myself. :)
142 >
143 > Cheers
144 > Rahul
145 > --
146 > M.Sc. Computer Science
147 > ETH Zürich
148 > Switzerland
149 >
150
151
152
153 --
154 Zhitong He
155 Sun Yat-sen University