You are not logged in.

#1 2010-02-18 09:54:20

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

netcfg v2.5.2 - note: change in auto wireless config

This release brings a completely new auto wireless/wired configuration. The old net-auto is deprecated and no longer included. There are also some very minor configuration changes that may affect a few people.

Move to new auto-wireless/wired
The new automatic connection has proper roaming support and will prove more reliable than the old setup - particularly with more complicated wireless configurations. To migrate to the new automatic wireless setup:
1. pacman -S core/wpa_actiond
2. Set WIRELESS_INTERFACE="" to your wireless interface in /etc/rc.conf.
For example WIRELESS_INTERFACE="wlan0"
3. Add net-auto-wireless to your DAEMONS=() array.

Note: wpa-config profiles do not work with this, convert them to wpa-configsection profiles. An example is included in
/etc/network.d/examples/

The new auto-wired uses similar configuration - follow the above instructions except use the net-auto-wired daemon, and WIRED_INTERFACE configuration option.

New features:
- net-auto-wireless/wpa_actiond - Real wireless roaming/auto connection. Based on same principle as autowifi. Requires optional dependency: wpa_actiond
- net-auto-wired - automatic ethernet configuration. Requires optional dependency: ifplugd
- Interface configurations - set options for all profiles using an interface
- Output hooks
- Internal cleanup & improvement

Internal changes:
- Uses wpa_supplicant for all wireless configuration by default, including wep/none security. This adds improves support for most and should improve reliability.
  - Uses iproute by default for all static configuration. net_tools which contains ifconfig is effectively obsolete and hasnt seen a release for over 8 years. The 'ethernet-iproute' and 'ethernet' connection types have been merged together to simply 'ethernet'. All options are still supported and existing configurations will continue to work for both types. A symlink has been made to ensure that profiles using 'ethernet-iproute' will continue to function.
 
Changes in configuration syntax
- net-auto and AUTO_NETWORKS is now deprecated in favour of net-auto-wireless/net-auto-wired.
- wireless: If you were previously specifying the wpa_supplicant driver in WPA_OPTS, you now need to specify it in WPA_DRIVER.
- wireless: iwconfig based configuration for wep/none can be used by changing to wep-old or none-old. This should not be necessary and is left in place only for the possibility of very old drivers that do not
support wpa_supplicant.
- ethernet-iproute: As 'ethernet' is now iproute based, those using 'ethernet-iproute' can revert the name. There is a symlink in place, so existing configurations of either name will continue to function
regardless.
- wireless-dbus: Unsupported. The wpa_supplicant dbus interface isn't particularly well documented and it doesn't fit well into the netcfg codebase. There is a symlink in place so that configurations using wireless-dbus will continue to function using the 'wireless' connection scripts.

Download:
netcfg 2.5.2 is in [core].
Source: ftp://ftp.archlinux.org/other/netcfg/ne … 5.2.tar.gz
PKGBUILD: In subversion

Documentation:
http://wiki.archlinux.org/index.php/Network_Profiles

Contributors:
I had a few big contributors to this release:
Jim Pryor: Many internal changes and improvements
Thomas Bächler: wpa_actiond based auto roaming/connection
Thanks guys!

Future Plans:
* Complete non-Arch support
* Redo rfkill using the 'rfkill' tool in the repos
* Fix bugs

Bugs:
On the bug tracker as always.

Last edited by iphitus (2010-02-18 11:22:41)

Offline

#2 2010-02-18 10:42:37

Finkregh
Member
From: Germany/Hannover
Registered: 2007-12-04
Posts: 44

Re: netcfg v2.5.2 - note: change in auto wireless config

nice..

any plans to add VLAN-Support? (bug and fix allready filed http://bugs.archlinux.org/task/15661 )

Offline

#3 2010-02-18 11:12:50

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: netcfg v2.5.2 - note: change in auto wireless config

Thanks a lot!

iphitus wrote:

1. pacman -S testing/wpa_actiond

Correction: It's in [core].

Offline

#4 2010-02-18 11:29:30

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.5.2 - note: change in auto wireless config

Lars Stokholm wrote:

Thanks a lot!

iphitus wrote:

1. pacman -S testing/wpa_actiond

Correction: It's in [core].

Amended, thank you!

Finkregh: yes, I'm sorry I didn't get it in. It'll be in 2.6. I'd like to do it a little bit differently though, as that patch reproduces the entire ethernet connection type. However if it could be implemented as a single option without reproduction in the existing connections/ethernet script, that'd be much easier. I've got a few ideas, but it'll be a while before I get to that.

James

Last edited by iphitus (2010-02-18 11:29:48)

Offline

#5 2010-02-18 15:22:44

aaaantoine
Member
Registered: 2008-12-12
Posts: 44

Re: netcfg v2.5.2 - note: change in auto wireless config

I see you also added the "current" parameter.  Very useful.  Thank you.


Edit: Duh, I forgot my router likes to randomly crap out on me for various reasons.  Restarted the router and all is well.

Anyway I'll be messing with the new auto-connect feature.  Thanks for the update!

Last edited by aaaantoine (2010-02-18 15:29:08)

Offline

#6 2010-02-19 12:09:09

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.5.2 - note: change in auto wireless config

Just a note, anyone with an open network, please ensure you add SECURITY="none". "

SECURITY is a required option for all wifi connections. This is an error in the example and I accidentally lost the check in the code too. Both will be fixed in 2.5.3

Offline

#7 2010-02-19 21:04:01

takedown
Member
From: Argentina
Registered: 2008-08-31
Posts: 219

Re: netcfg v2.5.2 - note: change in auto wireless config

great job iphitus and contributors!!!
thanks.

Only one issue:
if I put in my rc.conf:

DAEMONS=( ... @net-auto-wireless)

my network does't start at boot, but if i remove @ (not in background) netcfg do the job wink

Offline

#8 2010-02-21 00:59:54

aaaantoine
Member
Registered: 2008-12-12
Posts: 44

Re: netcfg v2.5.2 - note: change in auto wireless config

I continued to have difficulty connecting to my default wireless network, but I eventually figured out why.  I seem to recall netcfg used to not care if a POSTUP command failed.  I read somewhere that now it does.

So once I got that taken care of, I experimented with net-auto-wireless.  It fails for me with no error message.

Being a bit of a tinkerer, I looked into the net-auto-wireless script.  I found this line...
/usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null
...Removed the >/dev/null, and ran it again.


$ sudo /etc/rc.d/net-auto-wireless start
:: Starting netcfg auto-wireless mode for interface wlan0                         [BUSY] 
eth-xover
eth-hc
wifi-home
wifi-rounds
wifi-rollingst
wifi-kevin
eth-dhcp
Line 12: WPA-PSK accepted for key management, but no PSK configured.
Line 12: failed to parse network block.
Line 22: WPA-PSK accepted for key management, but no PSK configured.
Line 22: failed to parse network block.
Failed to read or parse configuration '/tmp/wpa.wlan0/wpa.conf'.
                                                                                  [FAIL]

...And now that I think about it,  I bet it's because I didn't set security="none" in the open network profiles.

...Yep, that was it.

Last edited by aaaantoine (2010-02-21 01:03:02)

Offline

#9 2010-02-21 11:59:43

Tyriel
Member
From: Melbourne, Australia
Registered: 2009-01-20
Posts: 161
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

Thank you iphitus for another great release smile


The software required Windows XP or better, so I installed archlinux.

Offline

#10 2010-02-21 12:45:34

Ibex
Member
Registered: 2006-03-02
Posts: 127

Re: netcfg v2.5.2 - note: change in auto wireless config

After a while struggeling to get the new netcfg working, I figurred that backslashes needs to be escaped in the new configfile.

So, instead of key="xxxx\xxxx", you need key="xxxxx\\xxxxx".

Offline

#11 2010-02-23 11:52:15

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg v2.5.2 - note: change in auto wireless config

netcfg 2.5.4 has been released. It contains bugfixes and some minor features.

netcfg v2.5.4
- Bridge connection example
- Add simple bridging support
- Add adjustable netmask to IP='static' with NETMASK=

netcfg v2.5.3
- Add missing include. FS#18411
- Fix FS#18391, FS#18385, broken rfkill, handle hard rfkill situations
more appropriately
- Modify examples to prevent quoting issues as illustrated by FS#18405
- Handle undefined wireless SECURITY, make example explicit


aaaantoine: That's fixed in 2.5.3. Wireless profiles should always specify security, but it seems I thought otherwise when I wrote the docs, and as such the scripts will now accept such profiles.

takedown: Backgrounding is redundant anyway as it backgrounds itself before attempting to connect.

Ibex: That's because the profiles are bash scripts. You could also use single quotes, eg: KEY='some \ key'. The example profiles have been amended to reflect this. Interestingly, that was one of the things overlooked in the 802.11 spec - you can legitimately specify absolutely any character in an ESSID, even a null or carriage return.

Offline

#12 2010-02-23 13:30:34

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,837

Re: netcfg v2.5.2 - note: change in auto wireless config

iphitus wrote:

takedown: Backgrounding is redundant anyway as it backgrounds itself before attempting to connect.

That's interesting as I get a noticeable delay in boot-up while it connects to my wireless network under 2.5 that didn't occur under 2.2.

Anyway, thanks for the work on this as it makes setting up multiple networks a lot simpler than it otherwise would have been.

Last edited by skanky (2010-02-23 13:32:12)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#13 2010-02-23 19:55:18

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,207
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

/me likes the new options POST_UP and POST_DOWN. I have a very real usage for them, since I have a NFS-share at home. But shutting down doesn't seem to work. I added to my profile:

POST_UP="sleep 5; /etc/rc.d/nfs-common start 2>/dev/null; sleep 2; mount -a 2>/dev/null;"
POST_DOWN="/etc/rc.d/nfs-common stop 2>/dev/null;"

The POST_UP works as intended, but the POST_DOWN doesn't seem to execute, as I always get a failure: "umount.nfs: DNS resolution failed at xxx"

Anyone?

Offline

#14 2010-02-23 20:27:28

Gusar
Member
Registered: 2009-08-25
Posts: 3,398

Re: netcfg v2.5.2 - note: change in auto wireless config

This is just a guess, but it seems to me you should use PRE_DOWN instead of POST_DOWN.

Offline

#15 2010-02-24 11:56:25

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,207
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

You are right.

Additionally, stopping the nfs-common-daemon is apparently not enough to unmount the nfs-shares, so the complete config for this should read:

POST_UP="sleep 5; /etc/rc.d/nfs-common start 2>/dev/null; sleep 2; mount -a 2>/dev/null;"
PRE_DOWN="/etc/rc.d/nfs-common stop 2>/dev/null;sleep 2; umount -t nfs -a 2>/dev/null;"

Offline

#16 2010-02-24 14:39:47

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: netcfg v2.5.2 - note: change in auto wireless config

when running net-auto-wireless (Starting the daemon) the POST_UP, PRE_UP, etcetera arent being executed...

tested this by issuing an echo >> "some_file" with them....

runing netcfg <profile> works though.


any clues?

Offline

#17 2010-02-24 17:32:48

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,207
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

eldragon wrote:

when running net-auto-wireless (Starting the daemon) the POST_UP, PRE_UP, etcetera arent being executed...

tested this by issuing an echo >> "some_file" with them....

runing netcfg <profile> works though.


any clues?

I read in the wiki that the script stops executing when the output is not empty or 0. That's why I added '2>/dev/null' to every command. Your echo-script will never be executed.

Offline

#18 2010-02-24 17:36:02

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: netcfg v2.5.2 - note: change in auto wireless config

zenlord wrote:
eldragon wrote:

when running net-auto-wireless (Starting the daemon) the POST_UP, PRE_UP, etcetera arent being executed...

tested this by issuing an echo >> "some_file" with them....

runing netcfg <profile> works though.


any clues?

I read in the wiki that the script stops executing when the output is not empty or 0. That's why I added '2>/dev/null' to every command. Your echo-script will never be executed.

this doesnt make sense. you mean the net-auto-wireless or the profile script?

anyway, i did test with &> and 2> redirections of outputs and it didnt work either

Last edited by eldragon (2010-02-24 17:36:31)

Offline

#19 2010-02-24 21:18:18

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,837

Re: netcfg v2.5.2 - note: change in auto wireless config

skanky wrote:
iphitus wrote:

takedown: Backgrounding is redundant anyway as it backgrounds itself before attempting to connect.

That's interesting as I get a noticeable delay in boot-up while it connects to my wireless network under 2.5 that didn't occur under 2.2.

Anyway, thanks for the work on this as it makes setting up multiple networks a lot simpler than it otherwise would have been.

Okay, resolved. Had "net-profiles" and "net-auto-wireless" in DAEMONS. Removing "net-profiles" did it. Many thanks to NeoXP. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#20 2010-02-24 22:26:13

NeoXP
Member
From: MS Matrix
Registered: 2009-01-09
Posts: 206
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

cool


Arch x86_64 on HP 6820s and on HP nx9420. Registered Linux User 350155, since 24-03-2004
"Everyone said that it could not be done, until someone came along who didn't know that."

Offline

#21 2010-02-25 16:49:17

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,207
Website

Re: netcfg v2.5.2 - note: change in auto wireless config

eldragon wrote:

this doesnt make sense. you mean the net-auto-wireless or the profile script?

anyway, i did test with &> and 2> redirections of outputs and it didnt work either

Don't shoot the pianist: http://wiki.archlinux.org/index.php/Net … _up.2Fdown

It works for me (starting and stopping nfs-common and (u)mounting shared dirs).

Zl.

Offline

#22 2010-02-25 20:28:59

aaaantoine
Member
Registered: 2008-12-12
Posts: 44

Re: netcfg v2.5.2 - note: change in auto wireless config

iphitus wrote:

netcfg 2.5.4 has been released. It contains bugfixes and some minor features.

netcfg v2.5.4
- Bridge connection example
- Add simple bridging support
- Add adjustable netmask to IP='static' with NETMASK=

Neat.  I set up bridging manually at the moment.  I'll have to check this out next time I want to go on XBOX Live.

iphitus wrote:

aaaantoine: That's fixed in 2.5.3. Wireless profiles should always specify security, but it seems I thought otherwise when I wrote the docs, and as such the scripts will now accept such profiles.

Yeah, once I paid attention to your previous post about explicitly defining SECURITY="none", I got it to work.

Offline

#23 2010-03-01 01:04:34

aaaantoine
Member
Registered: 2008-12-12
Posts: 44

Re: netcfg v2.5.2 - note: change in auto wireless config

Running the net-auto-wireless from an alternate location for the first time tonight.  It works, and I am as pleased as punch -- despite that phrase's sinister origins...

Last edited by aaaantoine (2010-03-01 01:06:08)

Offline

#24 2010-03-03 02:51:36

manouchk
Member
Registered: 2008-07-29
Posts: 212

Re: netcfg v2.5.2 - note: change in auto wireless config

Hi, I think ad-hoc mode may not be working in netcfg 2.5.x.

cf http://bbs.archlinux.org/viewtopic.php?id=92374

Last edited by manouchk (2010-03-03 02:51:59)

Offline

#25 2010-03-03 03:32:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: netcfg v2.5.2 - note: change in auto wireless config

Hi iphitus, reported this on the other thread, reporting again here.

I stay in A, work in B. When I suspend my machine at A, resuming in A, net-auto-wireless gets my connection up almost immediately. When I suspend my machine at A and go to B, net-auto-wired connects well (no wireless in B). When I then suspend my machine in B and go back to A, net-auto-wireless (which seems to be still running) doesn't connect to the wifi in A.

I'm not sure what I should do to debug, please advise.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB