You are not logged in.

#1 2012-06-06 14:01:01

adam777
Member
Registered: 2012-05-28
Posts: 161

[Solved] Netcfg - proflies, auto connect, auto reconnect

Hello all,
I've settled on netcfg to manage my connections, and have a few questions regarding its setup.
At the moment I'm only using a single profile (wired DHCP) which is handled just fine using net-auto-wired.
However, I would like to add a few more wireless profiles and was wondering what is the best way to handle it.

It seems that adding both net-auto-wired and net-auto-wireless to daemons is not the way, and I considered using net-profiles as a single daemon instead.
As far as I can understand, net-profiles will enable me to define list of profiles to try and connect to on boot (in order), which is fine as far as initial autoconnect is considered.
I was wondering how it handles wireless reconnect in case a connection was dropped.
It seems that net-auto-wireless is able to handle such events, but I'm not sure regarding net-profiles.

If someone could point out the solution, or if my logic has some flaw in it, do tell smile
Thanks, Adam.

Last edited by adam777 (2012-06-06 19:51:17)

Offline

#2 2012-06-06 15:01:13

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

If a connection drops, the kernel driver automatically attempts to reconnect - this is not dependant on netcfg, it would happen regardless of the utility in use.

net-auto-wireless provides roaming support, and will attempt to establish new connections as required if you are moving from one AP to another.

Offline

#3 2012-06-06 16:01:55

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

Thank, tomk.
I'll rephrase my question. Here's what I need:

1. Automatically connect in boot time, using a specified profile (or, better yet, using a list of profiles) regardless of profile type (wired, wireless) - net-profiles does exactly that.

2. In the case of connection drop - automatically try to reestablish same connection. Ideally, the ability to specify re-connection parameters (how many attempts, waiting period etc.) - If I understand correctly, the kernel is responsible for this. What netcfg profile will be attempted (currently active?) and what would be the re-connection parameters?

3. Roaming - not sure what is the meaning of roaming in regards to WiFi networks.
Suppose I configured profiles to home network and work network, if it means something like:
- Work on home network.
- Put laptop to standby.
- Go away from home network to work network.
- Resume from standby and realize home network isn't available.
- Automatically connect to work network.
Than the above is nice to have.
(Basically a switch when a boot isn't involved inbetween)
A "live-switch" (as in cellular communication when moving from one cell to another), though I'm not sure is even feasible for WiFi connections, isn't necessary.

Adam.

Last edited by adam777 (2012-06-06 16:06:05)

Offline

#4 2012-06-06 16:36:44

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

2. Yes, the kernel attempts to reestablish the connection that just dropped, therefore it's the same profile. I've never been disconnected long enough to start worrying about number of attempts, wait period, etc, so you'd need to look into that yourself.
3 Yes, that's what it does. The "live-switch", as you call it, is also covered, but will never be as seamless as cellular.

Offline

#5 2012-06-06 16:59:38

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

tomk wrote:

2. Yes, the kernel attempts to reestablish the connection that just dropped, therefore it's the same profile. I've never been disconnected long enough to start worrying about number of attempts, wait period, etc, so you'd need to look into that yourself.
3 Yes, that's what it does. The "live-switch", as you call it, is also covered, but will never be as seamless as cellular.

Thanks again,
I've just noticed that the ArchWiki clearly states net-profiles is used only to connect during boot, so I suppose it won't do on its own in regards to such scenario, right?

Offline

#6 2012-06-06 19:23:43

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

Which scenario?

net-profiles is an init script. It runs at boot time if you have it in rc.conf DAEMONS, and you can run it at any other time with the rc.d command, just like any other init script.

The kernel-attempting-to-reconnect-automatically thing applies to any dropped connection - the way that connection was started is irrelevant.

Offline

#7 2012-06-06 19:51:07

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: [Solved] Netcfg - proflies, auto connect, auto reconnect

Oh, OK.
I finally managed to make it all fits inside my head.
Thank.

Offline

Board footer

Powered by FluxBB