Networking Forums

Networking Forums > Wireless Networking > Wireless Internet > disable wireless upon ethernet connection

Reply
Thread Tools Display Modes

disable wireless upon ethernet connection

 
 
ericooi@gmail.com
Guest
Posts: n/a

 
      07-10-2006, 07:29 PM
I was wondering whether or not there was a method to auto disable my
wireless connection whenever I connect through a LAN/ethernet line?
I'm looking for a solution that can be done either through a script or
program. I've heard of AirSafe but am having trouble getting a hold of
a sales rep and was curious about other possible solutions.

Thanks.

 
Reply With Quote
 
 
 
 
John Navas
Guest
Posts: n/a

 
      07-11-2006, 12:05 AM
On 10 Jul 2006 12:29:23 -0700, (E-Mail Removed) wrote in
<(E-Mail Removed). com>:

>I was wondering whether or not there was a method to auto disable my
>wireless connection whenever I connect through a LAN/ethernet line?


Windows will use the last connection you make.

>I'm looking for a solution that can be done either through a script or
>program. I've heard of AirSafe but am having trouble getting a hold of
>a sales rep and was curious about other possible solutions.


<http://wireless.wikia.com/wiki/Wi-Fi#Connection_Managers>

--
Best regards, FAQ for Wireless Internet: <http://Wireless.wikia.com>
John Navas FAQ for Wi-Fi: <http://wireless.wikia.com/wiki/Wi-Fi>
Wi-Fi How To: <http://wireless.wikia.com/wiki/Wi-Fi_How_To>
Fixes to Wi-Fi Problems: <http://wireless.wikia.com/wiki/Wi-Fi_Fixes>
 
Reply With Quote
 
Jeff Liebermann
Guest
Posts: n/a

 
      07-11-2006, 05:15 AM
John Navas <(E-Mail Removed)> hath wroth:

>On 10 Jul 2006 12:29:23 -0700, (E-Mail Removed) wrote in
><(E-Mail Removed) .com>:
>
>>I was wondering whether or not there was a method to auto disable my
>>wireless connection whenever I connect through a LAN/ethernet line?

>
>Windows will use the last connection you make.


I beg to differ. Windoze assigns different route metrics to the
ethernet and wireless connections. Ethernet is considered the
"better" route and is used if available. See my tinkering at:
| http://groups.google.com/group/alt.i...de116db990c9be

>>I'm looking for a solution that can be done either through a script or
>>program.


Why? I'm curious what problem you're trying to solve with such a
script or program.

You can just right click on the network connection icons in the system
tray and simply disable/enable the required interface.

Or, if just gotta do it with a script or program, try:
| netsh interface set interface (nameofInterface) ENABLED
| netsh interface set interface (nameofInterface) DISABLED

To get the interface names, run:
| netsh interface dump
It will probably be something like "Local Area Connecton 3" (with the
quotes).

You can also use devcon (device control) program to do the same thing:
| http://support.microsoft.com/default...;EN-US;Q311272
Download, extract, and copy devcon.exe to an empty folder. Run:
| devcon find *
to list all the devices installed. Then run:
| devcon disable device_name


>>I've heard of AirSafe but am having trouble getting a hold of
>>a sales rep and was curious about other possible solutions.

>
><http://wireless.wikia.com/wiki/Wi-Fi#Connection_Managers>


--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558
 
Reply With Quote
 
John Navas
Guest
Posts: n/a

 
      07-11-2006, 05:50 AM
On Mon, 10 Jul 2006 22:15:28 -0700, Jeff Liebermann
<(E-Mail Removed)> wrote in
<(E-Mail Removed)>:

>John Navas <(E-Mail Removed)> hath wroth:
>
>>On 10 Jul 2006 12:29:23 -0700, (E-Mail Removed) wrote in
>><(E-Mail Removed) s.com>:
>>
>>>I was wondering whether or not there was a method to auto disable my
>>>wireless connection whenever I connect through a LAN/ethernet line?

>>
>>Windows will use the last connection you make.

>
>I beg to differ. Windoze assigns different route metrics to the
>ethernet and wireless connections. Ethernet is considered the
>"better" route and is used if available. See my tinkering at:
>| http://groups.google.com/group/alt.i...de116db990c9be


I beg to differ back -- it's not that simple. For example, I'm now
using a Wi-Fi connection with an automatic metric of 25. See The Cable
Guy -- April 2005, "Windows XP and Windows Server 2003 Behavior When
Connected to Both Wired and Wireless Networks"
<http://www.microsoft.com/technet/community/columns/cableguy/cg0405.mspx>:

* If there are multiple default routes with the lowest metric, choose
the default route corresponding to the network adapter that is
highest in the binding order.

The table right below that quote is more complete than your experiments,
with differing metrics for different interfaces. Note that:

* 10BaseT has the same metric as 802.11b, resolved by binding order.

That what I was thinking of, but of course my statement wasn't correct
in the general case. [blush]

* 10BaseT has a higher metric than 802.11a or 802.11g, and so won't be
favored over wireless.

* 100BaseT trumps everything else.

So if the OP has 100BaseT, then it will automatically take over from
wireless, which is what he wants. If on the other hard he has 10BaseT.
then it won't trump 802.11a or 802.11g, and might not even trump
802.11b.

Read on in that article for more insight on how to control the metric.

--
Best regards, FAQ for Wireless Internet: <http://Wireless.wikia.com>
John Navas FAQ for Wi-Fi: <http://wireless.wikia.com/wiki/Wi-Fi>
Wi-Fi How To: <http://wireless.wikia.com/wiki/Wi-Fi_How_To>
Fixes to Wi-Fi Problems: <http://wireless.wikia.com/wiki/Wi-Fi_Fixes>
 
Reply With Quote
 
John Navas
Guest
Posts: n/a

 
      08-03-2006, 10:11 PM
On Tue, 11 Jul 2006 05:50:55 GMT, John Navas
<(E-Mail Removed)> wrote in
<(E-Mail Removed)>:

>On Mon, 10 Jul 2006 22:15:28 -0700, Jeff Liebermann
><(E-Mail Removed)> wrote in
><(E-Mail Removed)>:
>
>>John Navas <(E-Mail Removed)> hath wroth:
>>
>>>On 10 Jul 2006 12:29:23 -0700, (E-Mail Removed) wrote in
>>><(E-Mail Removed) ps.com>:
>>>
>>>>I was wondering whether or not there was a method to auto disable my
>>>>wireless connection whenever I connect through a LAN/ethernet line?
>>>
>>>Windows will use the last connection you make.

>>
>>I beg to differ. Windoze assigns different route metrics to the
>>ethernet and wireless connections. Ethernet is considered the
>>"better" route and is used if available. See my tinkering at:
>>| http://groups.google.com/group/alt.i...de116db990c9be


I was actually partially correct -- see below.

>I beg to differ back -- it's not that simple. For example, I'm now
>using a Wi-Fi connection with an automatic metric of 25. See The Cable
>Guy -- April 2005, "Windows XP and Windows Server 2003 Behavior When
>Connected to Both Wired and Wireless Networks"
><http://www.microsoft.com/technet/community/columns/cableguy/cg0405.mspx>:
>
> * If there are multiple default routes with the lowest metric, choose
> the default route corresponding to the network adapter that is
> highest in the binding order.
>
>The table right below that quote is more complete than your experiments,
>with differing metrics for different interfaces. Note that:
>
>* 10BaseT has the same metric as 802.11b, resolved by binding order.
>
>That what I was thinking of, but of course my statement wasn't correct
>in the general case. [blush]
>
>* 10BaseT has a higher metric than 802.11a or 802.11g, and so won't be
>favored over wireless.
>
>* 100BaseT trumps everything else.
>
>So if the OP has 100BaseT, then it will automatically take over from
>wireless, which is what he wants. If on the other hard he has 10BaseT.
>then it won't trump 802.11a or 802.11g, and might not even trump
>802.11b.
>...


Since then it's been bugging me why Windows has automatically switched
to lower speed connections I've made, which wouldn't seem to make sense
given the above. For example, here's a route table with two Internet
connections, excellent Wi-Fi "g" at a reported 54 Mbps, and EGPRS(EDGE)
at under 200 Kbps over Bluetooth (with a virtual port speed of 460
Kbps):

|Active Routes:
|Network Destination Netmask Gateway Interface Metric
| 0.0.0.0 0.0.0.0 10.199.205.61 10.199.205.61 1
| 0.0.0.0 0.0.0.0 172.16.8.2 172.16.8.43 26
| 10.199.205.61 255.255.255.255 127.0.0.1 127.0.0.1 50
| 10.255.255.255 255.255.255.255 10.199.205.61 10.199.205.61 50
| 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
| 169.254.0.0 255.255.0.0 172.16.8.43 172.16.8.43 30
| 172.16.8.0 255.255.255.0 172.16.8.43 172.16.8.43 25
| 172.16.8.43 255.255.255.255 127.0.0.1 127.0.0.1 25
| 172.16.255.255 255.255.255.255 172.16.8.43 172.16.8.43 25
| 192.168.100.101 255.255.255.255 10.199.205.61 10.199.205.61 1
| 224.0.0.0 240.0.0.0 172.16.8.43 172.16.8.43 25
| 224.0.0.0 240.0.0.0 10.199.205.61 10.199.205.61 1
| 255.255.255.255 255.255.255.255 10.199.205.61 3 1
| 255.255.255.255 255.255.255.255 10.199.205.61 10.199.205.61 1
| 255.255.255.255 255.255.255.255 172.16.8.43 172.16.8.43 1
|Default Gateway: 10.199.205.61

Wi-Fi "g" Interface is 172.16.8.43; EGPRS Interface is 10.199.205.61
The EGPRS Metric of 1 trumps the Wi-Fi "g" Metric of 26 (note how it was
bumped up from 25 to 26), making it the Default Gateway. If I now
disconnect the EGPRS:

|Active Routes:
|Network Destination Netmask Gateway Interface Metric
| 0.0.0.0 0.0.0.0 172.16.8.2 172.16.8.43 25
| 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
| 169.254.0.0 255.255.0.0 172.16.8.43 172.16.8.43 30
| 172.16.8.0 255.255.255.0 172.16.8.43 172.16.8.43 25
| 172.16.8.43 255.255.255.255 127.0.0.1 127.0.0.1 25
| 172.16.255.255 255.255.255.255 172.16.8.43 172.16.8.43 25
| 224.0.0.0 240.0.0.0 172.16.8.43 172.16.8.43 25
| 255.255.255.255 255.255.255.255 172.16.8.43 3 1
| 255.255.255.255 255.255.255.255 172.16.8.43 172.16.8.43 1
|Default Gateway: 172.16.8.2

This behavior is what I had in mind when I originally wrote, "Windows
will use the last connection you make." It happens because EGPRS is a
Dial-Up connection. This behavior is controlled by the option "Use
default gateway on remote network" in Advanced TCP/IP Settings for
Dial-up Network Adapters.

For non-Dial-up Network Adapters, Metrics can be controlled with the
Interface Metric option in Advanced TCP/IP Settings. This would allow
the OP to do just what he wants no matter the speeds of the wireless and
wired connections.

--
Best regards, FAQ for Wireless Internet: <http://Wireless.wikia.com>
John Navas FAQ for Wi-Fi: <http://wireless.wikia.com/wiki/Wi-Fi>
Wi-Fi How To: <http://wireless.wikia.com/wiki/Wi-Fi_HowTo>
Fixes to Wi-Fi Problems: <http://wireless.wikia.com/wiki/Wi-Fi_Fixes>
 
Reply With Quote
 
John Navas
Guest
Posts: n/a

 
      08-03-2006, 10:20 PM
On 10 Jul 2006 12:29:23 -0700, (E-Mail Removed) wrote in
<(E-Mail Removed). com>:

>I was wondering whether or not there was a method to auto disable my
>wireless connection whenever I connect through a LAN/ethernet line?
>I'm looking for a solution that can be done either through a script or
>program. I've heard of AirSafe but am having trouble getting a hold of
>a sales rep and was curious about other possible solutions.


If your Ethernet is 100BaseT, it will always get preference over Wi-Fi
when connected. 10BaseT might not, unless you do the following:

Interface Metrics control which interface will be used at any given
time. To display them, Run "ROUTE PRINT" in a Command window. (To see
which Interface corresponds to which IP address, Run "IPCONFIG /ALL".)
The lowest Metric is given preference, and shown as the Default Route.

Metrics can be controlled with the Interface Metric option in Advanced
TCP/IP Settings. To ensure what you want, set the Metric of Wireless to
40, and it will be automatically overridden by Ethernet, even 10BaseT.

--
Best regards, FAQ for Wireless Internet: <http://Wireless.wikia.com>
John Navas FAQ for Wi-Fi: <http://wireless.wikia.com/wiki/Wi-Fi>
Wi-Fi How To: <http://wireless.wikia.com/wiki/Wi-Fi_HowTo>
Fixes to Wi-Fi Problems: <http://wireless.wikia.com/wiki/Wi-Fi_Fixes>
 
Reply With Quote
 
Jeff Liebermann
Guest
Posts: n/a

 
      08-04-2006, 04:26 AM
John Navas <(E-Mail Removed)> hath wroth:
>>I beg to differ back -- it's not that simple. For example, I'm now
>>using a Wi-Fi connection with an automatic metric of 25. See The Cable
>>Guy -- April 2005, "Windows XP and Windows Server 2003 Behavior When
>>Connected to Both Wired and Wireless Networks"
>><http://www.microsoft.com/technet/community/columns/cableguy/cg0405.mspx>:

(...)
>This behavior is what I had in mind when I originally wrote, "Windows
>will use the last connection you make." It happens because EGPRS is a
>Dial-Up connection. This behavior is controlled by the option "Use
>default gateway on remote network" in Advanced TCP/IP Settings for
>Dial-up Network Adapters.
>
>For non-Dial-up Network Adapters, Metrics can be controlled with the
>Interface Metric option in Advanced TCP/IP Settings. This would allow
>the OP to do just what he wants no matter the speeds of the wireless and
>wired connections.


Nice investigation. I was wondering how this worked. I had the same
experience. As soon as I fired up a dialup connection, my ethernet
connected network connection died and the default route went to the
dialup.

I did some digging in the MS Knowledge pile and found:

An explanation of the Automatic Metric feature for Internet Protocol
routes
http://support.microsoft.com/default...b;en-us;299540

The default values for XP SP2 are:
Link Speed Metric
Greater than 200 Mb 10
Greater than 80 Mb, and less than or equal to 200 Mb 20
Greater than 20 Mb, and less than or equal to 80 Mb 25
Greater than 4 Mb, and less than or equal to 20 Mb 30
Greater than 500 Kb, and less than or equal to 4 Mb 40
Less than or equal to 500 Kb 50


Description of the Wireless LAN Route Table Metric Behavior
http://support.microsoft.com/?kbid=315088

Configuring Multiple Adapters on the Same Physical Network
http://support.microsoft.com/kb/258487/EN-US/

--
Jeff Liebermann (E-Mail Removed)
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable wifi when ethernet is active Edwig Wireless Networks 2 08-30-2006 03:03 PM
wireless ethernet connection Htet Aung Wireless ethernet Problem Wireless Networks 0 08-05-2005 10:42 AM
Auto disable wireless connection upon docking Raymond Wireless Networks 1 01-07-2005 01:21 AM
MN-700 good wireless connection, no ethernet connection chris Broadband Hardware 2 10-31-2004 03:16 AM
How to Disable/Enable Ethernet adapter under command line Cliff Wang Windows Networking 0 05-21-2004 03:50 PM



1 2 3 4 5 6 7 8 9 10 11