You are not logged in.

#1 2013-06-05 21:06:23

SirWuffleton
Member
From: Washington, USA
Registered: 2013-06-05
Posts: 7
Website

Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

Hi! I've recently been having difficulties with Wicd, and have decided to try replacing it netctl. I've already got working profiles, but one thing that I would like to have working is multiple-interface automatic connection. As it is now (having both services enabled) a race condition exists, where one interface may hijack the default route, have no default route if one of them disconnects, or have a gateway conflict where no IP or Route is assigned to the interface.

I have two profiles for my home network, and I'd like to be able to use ethernet while at my desk and wireless while moving about the house. I'm currently dealing with this by leaving -ifplugd enabled, and only enabling -auto if I need to use a wireless connection, then disabling it before I reconnect to wired.
Is there a better, and more automated way of dealing with this situation?

Thanks in advance.

Offline

#2 2013-07-31 20:10:42

djo13
Member
Registered: 2013-07-31
Posts: 1

Re: Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

Hey SirWuffleton,

Did you ever get a fix for this??? I was thinking I might use dhcpcd@eth0.service on ethernet, which should work with ifplugd. Then keep the netctl-auto@wlan0.service going. Unless you got netctl-ifplugd@eth0.service and netctl-auto@wlan0.service simutaneously.

Thanks again,
DO

Offline

#3 2013-07-31 20:22:18

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

djo13 wrote:

Hey SirWuffleton,

Did you ever get a fix for this??? I was thinking I might use dhcpcd@eth0.service on ethernet, which should work with ifplugd. Then keep the netctl-auto@wlan0.service going. Unless you got netctl-ifplugd@eth0.service and netctl-auto@wlan0.service simutaneously.

Thanks again,
DO


That's how I would do it. Enable dhcpcd@<wired_interface>.service and netctl-auto@<wireless_interface>.service.

Offline

#4 2013-07-31 23:19:32

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

I have both ifplugd and auto profiles enabled. Difference is I'm always connecting to home wireless network with auto and
ifplugd profile is configured for sharing wlan0 internet access through eth0 to PC closer to laptop than router.
There shouldn't be any problems with setup you plan on using since netctl-auto won't do anything if there is no network available
and netctl-ifplugd runs only if cable is plugged in.

Last edited by Šaran (2013-07-31 23:20:29)

Offline

#5 2013-07-31 23:34:18

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

I have never tried this, but if there is this conflict that you speak of, what if you used netctl's hooks or the ExecUpPre to stop netctl-auto when the ifplugd profile is triggered?

Offline

#6 2013-08-01 09:30:14

SirWuffleton
Member
From: Washington, USA
Registered: 2013-06-05
Posts: 7
Website

Re: Netctl: Using netctl-ifplugd and netctl-auto simultaneously?

djo: The issue with that in my situation is that I require a static IP, and my locked-down Comcast gateway's pseudo-static DHCP option is extremely buggy. As crappy as it is, it does the job well enough to not warrant a separate router, especially since most of the good ones that support OpenWRT are quite pricey. I haven't really found a solution to the original problem, and still employ my original workaround, since entering my password once isn't much of an inconvenience.

Šaran: Well they're both in the subnet, and can automatically connect at the same time. Both are supposed to be used as my machine's default route, so things get kinda wonky when two interfaces are connected to the same network fighting over who gets to provide the default route. Since your situation has only one interface that needs to serve the machine's default gateway, you don't run into that problem when both of them are trying to connect/disconnect at the same time.

WonderWoofy: I was actually messing around with this as a possible solution when I first posted the problem. If I remember correctly, I couldn't manage to get it to play nicely, but I'll give it another shot in the morning to see if I can figure it out. I'd only messed with the ExecUp/ExecDown options, but hooks actually look like a far better candidate to solve this issue (as well as re-implementing some of my wicd-scripts.)

Offline

Board footer

Powered by FluxBB