You are not logged in.
Just uploaded netcfg v2.0.6. It's only a quick bug fix release so it doesn't have everything I've promised.
netcfg2 is a refined network profile system for Arch Linux, replacing the current implementation. Through this, it has also gained various features and improvements which are listed on the development wiki page (http://wiki.archlinux.org/index.php/Network_Scripts)
Wireless Detection
See wiki: http://wiki.archlinux.org/index.php/Network_Profiles
'EXCLUSIVE' profiles
A new option that allows easy network switching as requested in the last thread. Forces all other profiles to be shut down before an 'exclusive' profile is started (ie, runs on it's own no others active).
rc.conf, NETWORKS_EXCLUSIVE: Set all profiles to operate exclusively (no others active)
network.d/$profile, EXCLUSIVE: Set this profile only to operate exclusively (no others active)
Useful for switching networks and such. Can be set globally to only ever have one profile active, or in each individual profile.
Known bug: netcfg2 does nothing if the exclusive profile fails, thus leaving no profiles running.
Changelog
Fix automatic wireless for devices that need to be enabled before use (ifconfig $iface up)
Created option to allow only one network at a time. Useful for switching networks.
Catch invalid profiles FS9423
Fails if DNS2 not set. FS9525
Fixed PPP functionality: http://bbs.archlinux.org/viewtopic.php? … 65#p326065
quick workaround for EXCLUSIVE= potential bug
netcfg v2.0.6
Install
pacman -S core/netcfg
Documentation
* netcfg manpage
* Detailed examples in /etc/network.d/examples
* Wiki: http://wiki.archlinux.org/index.php/Network_Profiles
TODO
Fix WPA key parsing.
Check on profiles with SECURITY=none
Document netcfg-menu
Store last run profile somewhere
Document new 'exclusive' option
Fix problem when exclusive profile fails leaving no network connection
Last edited by iphitus (2008-03-11 12:43:17)
Offline
I just installed 2.0.6 and it works great! Now I can also use static IP with my Belkin F5D7050 (RT2500usb, but I use ndiswrapper).
Did you change something about that in 2.0.6?
EDIT:
Changelog
Fails if DNS2 not set. FS9525
Ah, maybe it was because of that
Last edited by n8schicht (2008-02-13 10:52:02)
Offline
Great to see your work, glad that your looking into the security=none issue, netcfg2 is going to be really nice when its finished
Edit:
Just tried your latest version added ifconfig ath0 up to rc.local,
and then when I run sudo netcfg2 krika it works, 2bad its not done automatically. network-profiles is added to my daemons list
Last edited by Tigertailz (2008-02-13 13:29:21)
Offline
Fixed PPP functionality: http://bbs.archlinux.org/viewtopic.php? … 65#p326065
What about my proposals?
http://bbs.archlinux.org/viewtopic.php? … 21#p321021
Offline
netcfg-auto-wifi now brings the interface up before scanning and "EXCLUSIVE" deactivates all other profiles before connecting to the new one without bringing restrictions to users that want to use more than one profile at a time.
+10
Great work.
Offline
Thanks for the Exclusive thing, but that's not what I really expected... (see my previous post in last thread)
Actually, if you use NETWORKS_EXCLUSIVE with more than one profile, every profile will be activated and then deactivated by the next one in the sequence, so that at the end only the last will remain active.
I'd thought to make a quick adjustment to the init script, which I'm posting here:
--- /etc/rc.d/net-profiles 2008-02-13 22:35:25.000000000 +0100
+++ /etc/rc.d/net-profiles 2008-02-13 23:00:01.000000000 +0100
@@ -29,6 +29,7 @@
else
# No NET= passed at boot, go to NETWORKS=()
for network in ${NETWORKS[@]}; do
+ [ "$ONE_NET_PROFILE_UP" ] && break
case $network in
menu) # Pull up menu of networks
/usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT
@@ -38,14 +39,15 @@
;;
*) # Either interface or profile
if [[ "$auto" ]]; then # Auto set, so interface
- /usr/bin/netcfg-$auto $network
+ /usr/bin/netcfg-$auto $network && ONE_NET_PROFILE_UP=1
unset auto
elif [ "$network" = "${network#!}" ]; then # otherwise profile
- /usr/bin/netcfg2 -c $network
+ /usr/bin/netcfg2 -c $network && ONE_NET_PROFILE_UP=1
fi
;;
esac
done
+ unset ONE_NET_PROFILE_UP
fi
add_daemon net-profiles
Nice job anyway!
Last edited by Venator85 (2008-02-24 14:58:12)
Offline
Mo: Oops. I had two ppp.subr's subitted to me. I'll merge some of the changes from yours too. Thanks for the example as well.
Venator85: Yeah, I'm not happy with the exclusive option yet either. I'll see what I can do to improve it.
Offline
hi.
just wanted to say thanks for this great program. after getting it working (with some tweaking and hair pulling) it has worked wonderfully since then. i really like the stability (compared to networkmanager) if the network and i can also switch between window managers and log out x.
it's fast, simple and stable.
thank you.
verner
Offline
new version works great for me.
Thanks
Offline
i have installed version 2.0.5 but after reading your changes i think the problem still remains in the new version!
the problem: i have to wireless networks: network A is named "asdfgh" for example. the network B is named "asd". when i use netcfg-auto-wireless to connect to network B it tries to use the network profile of network A. i think that has to do with names of the networks.
mfg iggy
sorry for my bad english
Offline
Offline
thanks phisphere, cu3edweb and thayer.
iggy: What are the network names?
Offline
Hi!
Thanks for your work, iphitus! However, I do have some problems:
1. It seems like I have some problems with ethernet and wireless profiles now. It worked in the last release, but now it seems /etc/rc.d/net-profiles is called before the interfaces eth0 and wlan0 are available (using kernel iwl*).
2. Check this out:
> iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 - Address: XX:XX:XX:XX:XX:XX
ESSID:"WLAN"
Mode:Master
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=48/100 Signal level=-80 dBm Noise level=-127 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=000000XXXXXXXXXX
Cell 02 - Address: XX:XX:XX:XX:XX:XX
ESSID:"WLAN"
Mode:Master
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=66/100 Signal level=-67 dBm Noise level=-127 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=000000XXXXXXXXXX
root@creep: /etc/network.d
> /etc/rc.d/net-profiles restart
:: work2 down DONE
:: Scanning for networks BUSY
home1: unknown interface: No such device
- No networks available. FAIL
:: work1 up BUSY
err, wlan0: timed out
- DHCP IP lease attempt failed FAIL
:: work2 up DONE
So, the first line shows that wlan0 is up (otherwise iwlist wouldn't work). But the message I get from netcfg2 is misleading...
I might be doing something wrong, any hints...?
Cheers,
Blind
Offline
I had to modify timings in /usr/lib/network/wireless.subr a little bit to suit my network.
My roommate uses Apples AirPort Extreme (based on NetBSD?) and it takes longer than usual to connect for some odd reason.
wpa_check()
while [[ $timeout -ne $TIMEOUT ]]; do
eval `wpa_cli status|grep wpa_state`
[[ "$wpa_state" = "COMPLETED" ]] && return 0
sleep 10
let timeout++
done
Original sleep is "1".
find_essid()
while [[ $try -ne $RETRIES ]]; do
if iwlist $INTERFACE scan|sed "s/ESSID://g"|grep -q "\"$ESSID\""; then
return 0 # network found
fi
sleep 3
let try++
done
Original sleep is "0.5".
All other "sleep 0.5" I changed to "1".
Offline
Iphitus,
Thank you for a fantastic work.
I have a question. I get a lot of errors like this: Wireless association failed.
My configuration file in /etc/networks.d is :
CONNECTION="wireless"
INTERFACE="wlan0"
# Use DHCP
#IFOPTS="dhcp"
IP="dhcp"
DHCP_TIMEOUT="20"
ESSID="ITTwo-wifi"
SECURITY="wpa"
KEY="top_secret"
#PRE_UP="iwlist $INTERFACE scan"
#Scan network before connecting
SCAN="YES"
TIMEOUT="90
As you can see I have a long time out. Using the PRE_UP parameter did not improve a thing.
Interestingly enough, once I get a connection I can walk across the road and it stays connected... but getting it to connect is a pain.
This is just very recent and I have done no changes in the network or hardware except for the fact that I'm using netcfg 2.0.6 but I do not think that is part of the problem.
Any ideas or suggestions I may try to improve connection to the access point would be appreciated.
Ricardo
Offline
What sucks about netcfg2 is that it doesn't let you select a network from a iwlist scan, prompt for a password and automatically create the profile similar to NetworkManager. I think it needs that.
Last edited by SpookyET (2008-02-17 22:13:02)
Offline
iggy: What are the network names?
the names are: "funkemariechen" and "funke". when i try to auto connect to funke netcfg2 wants to use the funkemariechen-profile.
mfg iggy
sorry for my bad english
Offline
What sucks about netcfg2 is that it doesn't let you select a network from a iwlist scan, prompt for a password and automatically create the profile similar to NetworkManager. I think it needs that.
+1
I would like to second that, this would be a really nice extension, especially for notebook users...
Offline
hi,
i am currently looking for a network tool that suits my needs and am wondering if netcfg2 can do this for me. I have looked in the docs and through this forum but cannot find the answer. Hope anyone can help.
I have a laptop with a up2date arch that i need to connect to several different networks. Two wired dhcp networks with eth0. one dhcp network with fixed ip. One unprotected wlan network with wlan0 and one WEP protected wireless network, both with dhcp.
I am now using WICD which sort of works but i have to connect manually each time. I have tried the default netcfg tools but i have found it to be inflexible and at my wireless locations eth0 would give a Huge timeout during boot since it was not connected.
Can this be done with netcfg2? if so can anyone tell me how? if not is there a tool that will work? I also have Vista on this laptop and it is really crappy but i must admit that it gets all this networking stuff right the first time and defines different profiles for each location.
hope you can help,
stefan
"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998
Offline
I guess it is possible. You should just make 4 profiles with the correct settings and put all the profiles in NETWORKS() in rc.conf. Upon startup, netcfg2 will search for all profiles and connect to the one(s) that is/are available. If you can connect to more than one network on one location, than you should look into the EXCLUSIVE-option, new in version 2.0.6.
One thing that is not yet possible is to automatically make arch switch profiles when changing locations, but that is only a 'problem' ($ su / # netcfg <profile>) if you are on the move and change locations without shutting down arch. But Iphitus has made a TO-DO out of the documentation of a possible netcfg-menu, which should allow a list of networks to chose from in the line of wicd/networkmanager (but far superior of course )
Zl.
Offline
hello!
i'm having troubles connecting to one of my networks:
the network.d file:
CONNECTION="wireless"
DESCRIPTION="wohnung muenchen"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wep"
ESSID="FRITZ!Box Fon WLAN 7050"
KEY="21X2eq42"
IP="dhcp
i alway get a message saying
DHCP IP lease attempt failed
netcfg2 is working with my other networks, no matter if wpa oder wep. and this connection is working without problems with wpa_supplicant.
hardware: broadcom b4318 using the b43 driver
cheers
stefan
edit: i also tried adding a \ before the ! in the essid
Last edited by blixawillbargeld (2008-02-19 20:39:26)
Offline
hello!
i'm having troubles connecting to one of my networks:
This probably doesn't help, but I see that your IP= line is missing a double quote after dhcp. Also, you might want to blank out your password (if that isn't already randomized for our sake.)
thayer williams ~ cinderwick.ca
Offline
hello!
the missing " is just a copy and paste error!
and its not my real password :-)
thx!
Offline
i dont know if you still need this info, but i just switched to netcfg2 and successfully use iwlwifi with wpa encryption and a hidden ssid. great work.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
with this latest update of netcfg2, I am now able to connect to open or known wep networks at boot. Awesome work!
Offline