Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A big thank you to the gentoo OpenRC networking team
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

What networking client do YOU use on your notebook?
wicd
28%
 28%  [ 16 ]
NetworkManager
33%
 33%  [ 19 ]
OpenRC + wpa_supplicant
38%
 38%  [ 22 ]
wifi-radar
0%
 0%  [ 0 ]
Total Votes : 57

Author Message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Wed Apr 17, 2013 11:27 am    Post subject: A big thank you to the gentoo OpenRC networking team Reply with quote

I just wanted to express my gratitude towards the devs that maintain the networking framework of OpenRC.

I've been using wicd for quite a long time on my notebook and wasn't always satisfied with it's performance, the little things, like clearing the ncurses screen because it's scanning while you're in the middle of configuring a network (scanning in general always worked strange in wicd), bad handling of Ah-Hoc networks, unreliable hotplugging of the wired connection.
And it's just another useless layer over wpa_supplicant anyways.

So I decided to migrate to a pure OpenRC + wpa_supplicant setup. I was amazed by how much better that is.
Dhcpcd now just sits on wpa_supplicant and gets an IP whenever it connects. Meanwhile my ethernet interfaces are conveniently and reliably managed by ifplugd (sadly Lennartware, but that's from 2005, before he became (in)famous) + OpenRC hotplugging.
And I can put the interfaces in runlevels, stack them ... so much flexibility. And the net virtual now works as expected, so I can use runlevels with suspending to RAM to control e.g. netmount.
And did I tell you that wpa_gui is actually one of the best GUI apps for Linux for wifi networking that I've seen in a long time (assuming you set up permissions to have access to the control interface)? Configuring a network is easy and it selects the appropriate encryption options for you (which wicd wouldn't and a more complicated setup would have to put into a custom template). And you can always resort to the plain-text wpa_supplicant.conf or wpa_cli. And it has WPS as a bonus.

It's possible that NetworkManager could come close, but having direct access over the interfaces via OpenRC is much more flexible and transparent and I don't want to have *kit crap on my notebook.

I just wanted to tell the community, that it is possible to have a very reliable, flexible, transparent, automatic and easy to set up (wpa_gui makes configuring wifi easy and hotplugging and ifplugd is automatic) roaming on a laptop just with OpenRC and wpa_supplicant.

I could make this into a HOW-TO on the wiki if people are interested.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Apr 17, 2013 12:22 pm    Post subject: Reply with quote

smartass ...

Did we discuss this on #gentoo? Perhaps it was someone else. Anyhow, openrc + wpa_supplicant has my vote, and stacked runlevels are the way to go for mobility. You didn't mention that with runlevels you can have separate config files for net and service, so really fine tuning what starts and with what kind of setup is very easy, eg:

Code:
# rc-config list online
Init scripts to be started by runlevel online
  dnscrypt-proxy
  firehol
  ipset
  net.wlp2s0
  ntp-client               
  unbound
# cat /etc/conf.d/net.wlp4s0.online
[...]
rc_ipset_before="firewall"
rc_net_wlp2s0_need="firewall"
modules_wlp2s0="!plug wpa_supplicant dhcpcd"
wpa_supplicant_wlp2s0="-Dnl80211 -qq"
wpa_timeout_wlp2s0="15"
config_wlp2s0="dhcp"
dhcp_wlp2s0="release nontp nonis nosendhost nodns"
dhcpcd_wlp2s0="-t 10 --nohook hostname"
dns_servers_wlp2s0="127.0.0.1"
dns_options_wlp2s0='edns0'
enable_ipv6_wlp2s0="false"
[...]
# rc-config list adhoc
Init scripts to be started by runlevel adhoc
  net.wlp2s0
# cat /etc/conf.d/net.wlp4s0.adhoc
[...]
config_wpl2s0="apipa"
wpa_supplicant_wlp2s0="-Dnl80211 -qq -c/etc/wpa_supplicant/wpa_supplicant-adhoc.conf"
[...]

(preup() postup() functions edited for brevity). Similarly, if a <service>.runlevel is provided in conf.d then this will be the config file used for that runlevel which means separate configurations can be created for specific locations/situations.

Openrc is really flexible in that regard, and your right, openrc developers deserve some kudos.

best ... khay
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Wed Apr 17, 2013 1:14 pm    Post subject: Reply with quote

I think we did discuss the stacked runlevels on #gentoo.

I wasn't aware of the /etc/conf.d/*.runlevel possibilities, this is great !
I wish stacked runlevels and this was documented in the handbook.

I started a how-to page on the wiki OpenRC_notebook_roaming_How-To. Feel free to contribute and expand (use-cases, examples...) :)

Edit> fixed link


Last edited by smartass on Thu Apr 18, 2013 1:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Apr 17, 2013 1:41 pm    Post subject: Reply with quote

I use openrc + wpa_supplicant + ifplugd for seamless switching between wired and wireless connections.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Wed Apr 17, 2013 1:52 pm    Post subject: Reply with quote

John R. Graham wrote:
...switching between ...

- John

Do you mean you just let both interfaces to come up or that you actually *switch* , i.e. when becomes configured, the other one goes down automagically. Not that I'd want to do that, just curious if it's possible.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Apr 17, 2013 1:54 pm    Post subject: Reply with quote

I actually switch and the other one goes down automagically. It is what I want as I don't want to be "on the air" unless I have to be. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Wed Apr 17, 2013 1:55 pm    Post subject: Reply with quote

ok, so how do you do that John? something like rc_conflict?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Apr 17, 2013 2:01 pm    Post subject: Reply with quote

It's covered briefly in the Handbook, Chapter 6; further information is in the man page. Basically, ifplugd reacts to the insertion or removal of an Ethernet cable and runs scripts. In those scripts, you can do whatever you want, typically "/etc/init.d/net.something start/stop". Really easy to set up.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Apr 17, 2013 3:05 pm    Post subject: Re: A big thank you to the gentoo OpenRC networking team Reply with quote

smartass wrote:
I could make this into a HOW-TO on the wiki if people are interested.
Yes, please. :P

Also, I didn't know that wpa_gui automatically selects the encryption. The last time I used it (~3-4 years ago) it didn't do so. That's when I moved to networkmanager.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Wed Apr 17, 2013 5:19 pm    Post subject: Reply with quote

John R. Graham wrote:
It's covered briefly in the Handbook, Chapter 6; further information is in the man page. Basically, ifplugd reacts to the insertion or removal of an Ethernet cable and runs scripts. In those scripts, you can do whatever you want, typically "/etc/init.d/net.something start/stop". Really easy to set up.

It is possible to do basically the same using NetworkManagerDispatcher: Synchronise your Gentoo Linux clock with an Internet time server.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 268

PostPosted: Wed Apr 17, 2013 5:49 pm    Post subject: Reply with quote

I am actually quite happy with wicd and always found it to be reliable.

The OpenRC with WPA_Supplicate thingy sounds interesting, though, might give it a look at some point.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Wed Apr 17, 2013 8:38 pm    Post subject: Reply with quote

dhcpcd + wpa_supplicant
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Apr 17, 2013 8:59 pm    Post subject: Reply with quote

logical_guy wrote:
I am actually quite happy with wicd and always found it to be reliable.

The problem with wicd is that it requires wireless extensions which are declared obsolete in the kernel for quite a while and perhaps are removed soon.
Checking whether future versions of wicd will fix the problem, I did not find out, but it appeared to me that new versions will have similarly crazy dependencies as NetworkManager (gtk3, polkit etc).

I had very bad experiences with wpa_supplicant gui - configuring with it simply did not work - but this was some years ago. Is it really sensible to use it if e.g. you are in a hotel and have no idea about the available connectiions or provided net names (or e.g. get only some login code without much information about the way things are encrypted)? (Unfortunately such things are hard to test unless you are in such a situation...)
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Wed Apr 17, 2013 11:34 pm    Post subject: Reply with quote

Using systemd and wpa_supplicant I voted not clicking any of the possibilities. But it is not counted :(
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Apr 17, 2013 11:44 pm    Post subject: Reply with quote

mv wrote:
I had very bad experiences with wpa_supplicant gui - configuring with it simply did not work - but this was some years ago. Is it really sensible to use it if e.g. you are in a hotel and have no idea about the available connectiions or provided net names (or e.g. get only some login code without much information about the way things are encrypted)? (Unfortunately such things are hard to test unless you are in such a situation...)

mv ... I've never actually used wpa_gui, but anyhow, next to no information is required in a network stanza, wpa_supplicant will negotiate it based on the information provided by the AP. Or, if you really needed to know, such information can be acquired easily with the use of 'iw dev <interface_name> scan' or 'wpa_cli scan'. As long at you know the pass (and, maybe, identity) the rest is fairly easy, not a "click away", but easy. I can switch, or configure a new network, in no time with wpa_cli (which, incidentally, can be run as a shell, and has readline, completion, history, and builtin help). AP's broadcast all the information that is need to connect, with the exception of the password, actually, they'll do that as well, if they happen to be using WPS, but that's an altogether different story. The way wpa_supplicant works is to read any information it isn't provided from an ap_scan, a network stanza with ssid, auth_alg, key_mgmt, and psk (or 'password' and 'identity') will generally be enough information for wpa_supplicant to establish a connection. Most hotels, libraries, etc, uses radius to authenticate, so mostly its WPA-RADIUS, PEAP or MSCHAPv2 (which is often found in universities in the form of 'eduroam') this is just slightly different as you generally provide an "identity" and "password" and perhaps a cert. Don't ask me about EAP-FAST ... or I'll have to send you an NDA and hefty bill :)

best ... khay
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Apr 18, 2013 12:04 am    Post subject: Reply with quote

ulenrich wrote:
Using systemd and wpa_supplicant I voted not clicking any of the possibilities. But it is not counted :(

"If you are a developer, instead of wondering what to do about network.target, please just fix your program to be friendly to dynamically changing network configuration. That way you will make your users happy because things just start to work, and you will get fewer bug reports as your stuff is just rock solid."
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Apr 18, 2013 1:02 am    Post subject: Reply with quote

Wow. Pottering quote?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
logical_guy
Apprentice
Apprentice


Joined: 18 Sep 2007
Posts: 268

PostPosted: Thu Apr 18, 2013 5:11 am    Post subject: Reply with quote

mv wrote:
logical_guy wrote:
I am actually quite happy with wicd and always found it to be reliable.

The problem with wicd is that it requires wireless extensions which are declared obsolete in the kernel for quite a while and perhaps are removed soon.


Erm... any idea why? And why take away something that works unless it is going to be replaced by something better?
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Thu Apr 18, 2013 5:27 am    Post subject: Reply with quote

The vote in first post is missing option "pon" :P
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Thu Apr 18, 2013 5:31 am    Post subject: Reply with quote

John R. Graham wrote:
Wow. Pottering quote?

- John
It seems to be fairly close, but it seems to be the official systemd position:
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Thu Apr 18, 2013 6:24 am    Post subject: Reply with quote

I'm sorry for not including systemd and pon, I didn't consider them networking clients.

As far as I understand, systemd considers networking to be something that running programs should control or resolve themselves, no the init system. Although it can be configured to act as other init systems, I don't think systemd's networking stack is on par with the one provided by OpenRC, simply because systemd doesn't implement one by design, so another networking client or script must be used anyways.

AFAIK pon does not work as all-in-one solution for networking, only provides the PPP layer.

I've described most of the concepts of an OpenRC + wpa_supplicant roaming solution on the wiki: OpenRC notebook roaming How-To
It still needs more code examples to expand the vague descriptions. Feel free to contribute your own examples and use-cases or expand existing ones.
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Thu Apr 18, 2013 6:31 am    Post subject: Reply with quote

smartass wrote:
AFAIK pon does not work as all-in-one solution for networking, only provides the PPP layer.


well, net-dialup/ppp, net-misc/dhcpcd, and sys-apps/usb_modeswitch are the only networking related packages I have installed for getting the network up and configured with plain `pon provider` call
imho, both oldnet and newnet methods from OpenRC suck for custom PPP setups
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Thu Apr 18, 2013 6:39 am    Post subject: Reply with quote

there are plans in separating the oldnet method (the current default with USE="-newnet" from OpenRC to it's own application, which could then be reused for getting networking up with systemd
it's one of the main blockers for some of the current developers road to systemd

and people are working on getting the ArchLinux's tool `netctl` working too:

Quote:

* net-misc/netctl
Available versions: (~)0.6 (~)0.7 (~)0.8 **9999
Homepage: https://www.archlinux.org/netctl/
Description: Profile based network connection tool from Arch Linux


which could also be used in both, OpenRC and systemd

so you could have OpenRC with basically no networking support installed and then pick your own, oldnet, newnet, netctl, networkmanager, wicd, ...

but yeah, kudos to WilliamH and others who have kept OpenRC maintained
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Thu Apr 18, 2013 7:04 am    Post subject: Reply with quote

netctl and it predecessor netcfg (yes, I did use them) aren't very automatic, everything has to be set up from scratch without reasonable defaults and no good support for ifplugd or roaming. It's just another layer on top of standard tools like wpa_supplicant and dhcpcd requiring a lot of manual intervention. So thank you, but no thank you.

As for modularity, I welcome collaboration between projects but I fear that by removing the networking stack from the init system it will become much harder to have fine grained control over service dependencies that require specific networking setups which is a great thing on servers. It still might be possible to get it working in a similar way, but with a lot more glue-scripts and that's not a good thing.

Please don't jeopardize functionality just for the sake of getting something else working.

And maintaining a compatible interface for all these plug-ins will require a lot more work and maintenance. Just look at how badly wicd supports the net virtual.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Apr 18, 2013 7:14 am    Post subject: Reply with quote

logical_guy wrote:
mv wrote:
The problem with wicd is that it requires wireless extensions which are declared obsolete in the kernel for quite a while and perhaps are removed soon.

Erm... any idea why? And why take away something that works unless it is going to be replaced by something better?

I am really not an expert in this field, but AFAIK wireless extensions are replaced by nl80211 (whatever this means...).
kernel's features-removal-schedule.txt wrote:
CONFIG_CFG80211_WEXT
When: as soon as distributions ship [...] wpa_supplicant 1.0 and NetworkManager/connman/etc
Why: Wireless extensions are deprecated, and userland tools are moving to using nl80211. New drivers are no longer using wireless extensions, and while there might still be old drivers, both new drivers and new userland no longer needs them and they can't be used for an feature developed in the past couple of years. As such, compatibility with wireless extensions in new drivers will be removed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum