You are not logged in.

#1 2009-08-26 19:42:32

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

[SOLVED] Problems with the automatic setup of my connections

Hi,

basically I want to use two different types of connections, on the one hand it may be that there is a ethernet cable plugged in, in this case my arch should choose the ethernet connection, otherwise it should try to connect to my wireless connection.

I think net-auto is the right way to go for me, but I can't configure it right.

I have two configurations for netcfg. The first one is called "ethernet_dhcp", the second one is "jupiter_wlan_nas":
/etc/network.d/ethernet_dhcp

CONNECTION="ethernet-iproute"
DESCRIPTION="A dhcp ethernet connection using iproute"
INTERFACE="eth0"
IP="dhcp"

/etc/network.d/jupiter_wlan_nas

CONNECTION="wireless"
DESCRIPTION="Wireless connection towards jupiter_wlan_nas"
INTERFACE="wlan0"
SECURITY="wpa"
ESSID="jupiter_wlan_nas"
KEY="my_wlan_key"
IP="dhcp"
SCAN="no"
TIMEOUT="10"

Here is my /etc/rc.conf

#I have commented the following lines as I think it gets setup with net-auto
#wlan0="dhcp"
#eth0="dhcp"
INTERFACES=()

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

#NETWORKS=(main)

AUTO_NETWORKS=(auto-wireless wlan0)

DAEMONS=(syslog-ng network netfs crond net-auto)

Now I have various issues:

1.) During boot up there is displayed a "Scanning for networks", although I have set "scan="no"", is there any reason for this? Or is this the normal message from net-auto?
2.) Do I have to add something to "AUTO_NETWORKS" in order to let also my ethernet connection to be taken into account during boot-up, because currently it only says just "auto-wireless wlan0", eth0 isn't mentioned.
3.) Is it right to comment out "wlan0" and "eth0" and to delete them from "INTERFACES"?

Sorry for these question, but I couldn't find any clear information about this sad.

Last edited by johnpatcher (2009-08-27 20:14:12)

Offline

#2 2009-08-26 20:05:53

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] Problems with the automatic setup of my connections

3. INTERFACES is used by the network daemon. If you remove network from DAEMONS, or put a "!" in front of it, this array will be ignored. (IOW, it doesn't matter what it contains.)

1+2. net-auto only works with wireless interfaces. If you use net-auto, you must scan, that's the way it works. It scans to see what ESSIDs are around, then tries to connect to the first wireless profile it finds which declares one of the ESSIDs it saw.

netcfg doesn't by itself handle the arrangement you want (try to load ethernet, if that fails do wireless, but do only one). There are various hooks and so on that you can use on top of netcfg to get this working, but there's no official, well-defined strategy for doing it. And it's not simple and straightforward, either.

Offline

#3 2009-08-26 20:37:14

johnpatcher
Member
Registered: 2009-08-23
Posts: 70

Re: [SOLVED] Problems with the automatic setup of my connections

Ok, thanks for your answer. I will try to make my own scripts as soon as all other things run wink.

Btw: What is the scan option for, when net-auto will scan for networks anyway?

Last edited by johnpatcher (2009-08-26 20:37:42)

Offline

#4 2009-08-27 00:47:02

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] Problems with the automatic setup of my connections

If you try to launch a profile from the command line, by doing

netcfg my_profile

the SCAN option determines whether, before attempting to connect, netcfg first scans to make sure that the specified ESSID is present. I forget whether the default for this is YES or NO, I think it's YES.

The key here is that netcfg can be used without net-auto: either when called manually from the command line, or when called via the net-profiles DAEMON.

Offline

Board footer

Powered by FluxBB