You are not logged in.
No, you have to specify
NETWORKS=(auto-wireless XXX)
where XXX is the name of you wireless interface (e.g. wlan0)!
eth0 is usually an ethernet, and not a wireless, interface.
Sorry if I explain something obvious.
Offline
Hi all,
I noticed a small thing on wireless profile:
I need to specify extra options with
WEP_OPTS="..."
instead of
IFOPTS="..."
Offline
hi people, i only see you talking about wireless stuff. I just have a ethernet connection and would want to know if there is a auto-ethernet...
I have 2 network cards on my desktop, sometimes i have one connected and other times the other one is the one connected. My router gives ips from dhcp.
Is there something really simple that i don't see, that can scan for the ethernet that is connected get the address and then stop? I just need that. With the old/current style, it takes quite some time to get the ips, because one of the interfaces isn't connected and it stil gets a strange ip something like 169.???.???.???
help?
Offline
have you tried making a profile for each interface?
i thinkt it should connect to the first that is up, and since only one will be up at a time, it will connect to that.
Offline
have you tried making a profile for each interface?
i thinkt it should connect to the first that is up, and since only one will be up at a time, it will connect to that.
i'll try it
Offline
It seems that nobody uses a wifi card with the chipset RaLink RT2500. Or mayby nobody had the same problem. I came to the conclusion that the problem with netcfg2 lays in the file /usr/lib/network/wireless.subr, in fact in the line
# Required by ipw3945 to properly re-associate
eval "iwconfig $INTERFACE mode managed essid \"$ESSID\""
After commenting this line I can connect to my router with the profile:
CONNECTION="wireless"
HOSTNAME=turtle
INTERFACE=ra0
ESSID="pointer"
IP="static"
IFOPTS="192.168.2.102 netmask 255.255.255.0 broadcast 192.168.2.255"
GATEWAY="192.168.2.1"
DNS1=10.10.0.1
WEP_OPTS="essid $ESSID"
SCAN="yes"
SECURITY="none"
PRE_UP="/usr/local/bin/pointer"
TIMEOUT=20
However, in order not to modify the file /usr/lib/network/wireless.subr I decided to change my profile to:
CONNECTION="ethernet"
HOSTNAME=turtle
INTERFACE=ra0
IP="static"
IFOPTS="192.168.2.102 netmask 255.255.255.0 broadcast 192.168.2.255"
GATEWAY="192.168.2.1"
DNS1=10.10.0.1
PRE_UP="/usr/local/bin/pointer"
and now with the file /usr/local/bin/pointer"
#!/bin/bash
iwconfig ra0 mode managed
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwconfig ra0 essid pointer
iwpriv ra0 set WPAPSK=mypassphrase
iwconfig ra0 essid pointer
it works. Hope, it will be useful for people using RaLink RT2500 with WPA.
Offline
Is it correct that netcfg sets up ethernet *and also* wifi network since both are available? Is not better to ignore wifi since the first network is up?
That's what the EXCLUSIVE-option is for.
Zl.
Offline
However it seems to have problem if they have the same network gateway ?
Offline
Thankful if somebody would give an example how the 'auto-wireless' and 'EXCLUSIVE-option' are to be used. They don't seem to make any sense, why I prefer not to use them. What are they good for?
I would much appreciate some examples explained in plain English
Offline
In the profile, you can set "EXCLUSIVE=yes" to tell Netcfg2 that if this profile is activated, all other profiles must be deactivatet.
Then, for example, if you change from one to another profile, the first one gets disabled before the first is enabled.
I use EXCLUSIVE for every profile btw, before that option was included i had to modify netcfg2 by hand to shut down all profiles before connecting to a new one...
exclusive ftw
Offline
Hehe... that seems like madness... editing rc.conf and/or having many NETWORKS=() lines hashed (#) except for one unhashed would accomplish the same thing, wouldn't it?
Something like this:
#NETWORKS=(wlan0 wep ethernet)
#NETWORKS=(ethernet)
NETWORKS=(wlan0)
#NETWORKS=(menu)
Or am I still missing some delicacy of netcfg2?
Offline
Don't you think
NETWORKS_EXCLUSIVE=(wlan0 wep ethernet)
is more simple, more KISS, more Archlinux?
Zl.
Offline
I just don't get it
I only have three profiles. What would
NETWORKS_EXCLUSIVE=(wlan0 wep ethernet)
accomplish that would not be accomplished by
NETWORKS=(wlan0 wep ethernet)
?
Offline
Your method could get you 3 IP addresses if you're able to connect to all three profiles at the same time.
The EXCLUSIVE (in rc.conf or inside the profiles) method will stop connecting to profiles once 1 connection is established.
I hope it's clear now.
Zl.
Offline
Auto-wireless was driving me crazy for a while now, because it always connected me to my neighbours network and not to mine. Here is how it looked like:
Me: profile name: ahb SSID: pozilei
Neighbour: profile name: hxo SSID: HNXEOT
I thought, maybe it has something to do with alphabetical order of SSID, so I changed mine to bergwerk, but still my neighbour's network came up with auto-wireless. So I changed it to ANHEBT, and now it actually connects my own network first.
But why is that? I can't really see the logic behind it.
And also: wouldn't it make sense to introduce a new parameter in the profiles, something like FIRSTCHOICE="yes"?
Or (even better): couldn't the logic behind all this be changed to connect to the strongest network available?
Offline
I've written a script /usr/bin/netcfg-auto-ip to solve this problem.
ref: http://bbs.archlinux.org/viewtopic.php?pid=351894
Hi, I'm trying the netcfg v2.0.6-1 today.
I wish it could auto-detect my ethernet settings.
In my office A, it is static ip 192.168.1.123
In my office B, it is static ip 192.168.3.124
In my home, it is dhcp.
In coffee shop, it is wireless auto-detect.Is there any good example to let it work?
I'v tried put
NETWORKS=(office_a office_b ethernet auto_wireless wlan0).
But, it said I put the duplicate eth0. in office_a and office_b.So, if it possible to add a ping gateway method to auto-detect which static ethernet is connected?
Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages
Offline
Ok, now wireless works pretty ok. Found a madwifi driver that i compiled and put into kernel, but I presume there is something with /etc/rc.d/net-profiles. Running /etc/rc.d/net-profiles home fails, but running netcfg2 home it works. So the best is probably to hash all net-profiles in rc.conf and become superuser after boot up and start wireless with 'netcfg2 home'. Same with my wep setup. Works only with 'netcfg2 wep'.
I wonder if my /etc/rc.d/net-profiles is correct.
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
if ! ck_daemon net-profiles; then
echo "net-profiles has already been started. Try '/etc/rc.d/net-pr$
exit
fi
# Ensure any device renaming has occurred as intended
for daemon in "${DAEMONS[@]}"; do
if [ "$daemon" = "${daemon#!}" -a "$daemon" = "net-rename" ]; then
if ck_daemon net-rename; then
/etc/rc.d/net-rename start
fi
fi
done
# $NET env var is passed from the kernel boot line
[ ! "$NETWORKS_MENU_TIMEOUT" ] && NETWORKS_MENU_TIMEOUT=5
if [[ "$NET" = "menu" ]]; then
/usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT
elif [[ "$NET" ]]; then
/usr/bin/netcfg2 -c $NET
else
# No NET= passed at boot, go to NETWORKS=()
for network in ${NETWORKS[@]}; do
case $network in
menu) # Pull up menu of networks
/usr/bin/netcfg-menu $NETWORKS_MENU_TIMEOUT
;;
auto-*) # Automatic configuration, store type and get inter$
auto=$network
;;
*) # Either interface or profile
if [[ "$auto" ]]; then # Auto set, so interface
/usr/bin/netcfg-$auto $network
unset auto
elif [ "$network" = "${network#!}" ]; then # otherwise $
/usr/bin/netcfg2 -c $network
fi
;;
esac
done
fi
add_daemon net-profiles
;;
stop)
# shutdown any profiles started by netcfg (or from NET_PROFILES in rc.c$
/usr/bin/netcfg2 -a
rm_daemon net-profiles
;;
restart)
$0 stop; sleep 1; $0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
# vim: set ts=4 et sw=4:
Offline
Hello guys,
Sorry but I still don't get it: how NETWORKS_EXCLUSIVE is supposed to work, as it's not checked anywhere in
/etc/rc.d/net-profiles ? The only reference to it is in /usr/lib/network/network.subr, but as far as I understood
the script, that only runs IF netcfg2 is executed first. So if I replace NETWORKS with NETWORKS_EXCLUSIVE
on rc.conf, no network connection is ever attempted...
Could someone correct me if I missed something ?
Nevertheless, netcfg2 is a big step up. Keep up the great work!
Offline
Doesn't work for me either. Neither does NETWORKS=()
Only thing that works is doing netcfg2 PROFILE
I have net-profiles in the daemons array, but all NETWORKS profiles in rc.conf hashed (#). Main thing it works, but i agree netcfg2 information is sparsely planted - hehe.
Offline
I have used autowifi on my laptop HP6910p, and it worked correctly.
Today I installed netcfg and it starts on boot, but when i try reboot my linux freezes. My wireless device is:
Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection
Offline
linfan: when you added net-profiles to the daemons array, did you remove the old network(s?) from the same array?
Offline
Yes, Sir, I sure did
I think I got it working now. (Knock, knock....) Added the TIMEOUT from 20 to 40 in the profile.
Offline
That is what I would like, a setup where it first checks for a wired connection, then for my pre-configured wireless and if not then scan for any open networks around and connect to that. Three obstacles to this setup for me though:
Problem #1: Making profiles exclusive
I have this in my rc.conf:
#NETWORKS_EXCLUSIVE=(wired 2a auto-wireless wlan0)
NETWORKS=(wired 2a auto-wireless wlan0)
When I try the NETWORKS_EXCLUSIVE, nothing happens. The daemon starts, but there's no connection.
with 'NETWORKS', it checks them in the order given, but it does not respect the
EXCLUSIVE=yes
line I've added to the 'wired' profile.
Is this a bug or am I doing something wrong here?
Problem # 2: Wpa doesn't work
When I try to connect to the 2a network, I get this:
:: 2a up - wpa_supplicant did not start, possible configuration error [FAIL]
the profile looks like this (hidden essid btw):
CONNECTION="wireless"
DESCRIPTION="wireless på 2a"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa"
ESSID="RHK2A"
KEY="I could tell you, but then I'd have to... nevermind"
IP="dhcp"
TIMEOUT=20
and I am using the iwlwifi-3945-ucode driver. Any clues as to what to do here?
Problem 3: Connecting to any given unprotected network
Zenlord wrote:
The auto-wireless script will try all profiles that are bound to the interface you specified. Nothing more, nothing less. If you configure a global wireless profile (f.e. one without WEP or WPA(2), with DHCP="YES" and with SCAN="yes"), then the auto-wireless script will try all profiles (alphabetically?), including this one.
About the global profile, could I put something in ESSID to make it choose whatever is available (or simply comment it out)? What about the KEY field when security is set to 'none'? I have guesstimated it to look something like this but I don't know if it's right (can't test it right now)
CONNECTION="wireless"
DESCRIPTION="Connects to any unprotected network"
INTERFACE=wlan0
SCAN="yes"
SECURITY="none"
#ESSID=""
#KEY=""
IP="dhcp"
TIMEOUT=20
Offline
Can you do bonding with netcfg2? http://www.linux.com/feature/133849
Offline
Haven't done it, but a quick glance at your link suggests that you could put the necessary ifenslave etc stuff in PREUP, and then use bond0 in your profile.
Offline