Re: "Adapter Switching" option which powers down the wireless radio when a wired ethernet connection is detected
- From: Dan Williams <dcbw redhat com>
- To: John Walicki <walicki us ibm com>
- Cc: networkmanager-list gnome org
- Subject: Re: "Adapter Switching" option which powers down the wireless radio when a wired ethernet connection is detected
- Date: Mon, 17 Sep 2012 15:32:56 -0500
On Mon, 2012-09-17 at 14:11 -0400, John Walicki wrote:
> In the Intel ProSet utility on Windows there is an "Adapter Switching"
> option which powers down the wireless radio when a wired ethernet
> connection is detected. The wireless radio is powered down when the
> ethernet cable is inserted and the wireless adapter is powered on once
> again when the ethernet cable is removed.
>
> Normally, a dual homed environment with both wired and wireless having
> assigned IP addresses is preferable. Routing will send the packets over
> the preferred interface. We're constrained by the available IP range for
> wireless devices and only want to assign the IP address if the laptop is
> untethered.
>
> Is this possible with NetworkManager?
Hi John,
This was brought up in the last two weeks, and we approached it by using
Dispatcher scripts to "airplane mode" the wifi. That should work for
you if you don't mind a short period of time (like 1 second) where both
the wired and the wifi networks are connected with IP addresses. This
would entail a dispatcher script that:
1) whenever it gets an "up" event, runs "nmcli dev" and looks for any
line that contains *both* "802-3-ethernet" and "connected"; if one is
found, it executes "nmcli nm wifi off".
2) whenever it gets a "down" even, runs "nmcli dev" and looks for any
line that contains *both* "802-3-ethernet" and [ "connecting" or
"connected" ]. If none of these lines around found, it runs "nmcli nm
wifi on".
The previous query had a network that simply would not give a DHCP lease
when the wifi still had an IP, and the dispatcher scripts could not
handle that case (yet). However, all that information is available via
D-Bus, so that's another option.
That said, this is something that might make sense to integrate into NM
on a more permanent basis in the future.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]