Choosing from multiple network connections

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a laptop running Windows XP SP2 with a built-in wireless adapter as
well as an ethernet port. If I connect via the ethernet cable in an
environment where I had previously connected via wireless (e.g. my home), how
do I get the internet connection to default to the ethernet port, rather than
the wireless?
 
"Shai said:
I have a laptop running Windows XP SP2 with a built-in wireless adapter as
well as an ethernet port. If I connect via the ethernet cable in an
environment where I had previously connected via wireless (e.g. my home), how
do I get the internet connection to default to the ethernet port, rather than
the wireless?

If only one of the two connections is enabled and connected, XP will
automatically use that one.

If both connections are enabled and connected, XP will automatically
use the one that has the higher rated speed. For example, it will
always use a 100 Mb wired connection rather than a wireless
connection.

You can specify which connection to use by manually assigning a metric
to each connection, giving a lower value to the desired connection.

To assign a metric to a network connection:

1. Open the Network Connections folder.
2. Right click the desired connection.
3. Click Properties | Internet Protocol (TCP/IP).
4. Click Properties | Advanced.
5. Un-check "Automatic metric".
6. Enter a number between 1 and 9999 for the "Interface metric".
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
If both connections are enabled and connected, XP will automatically
use the one that has the higher rated speed.
For example, it will
always use a 100 Mb wired connection rather than a wireless
connection.

Is this so regardless of the metric tweak outlined below?
You can specify which connection to use by manually assigning a metric
to each connection, giving a lower value to the desired connection.

Tried this trick with my two connections, and it didn't really work. After a
while it kinda defaulted to the wired connection regardless of the fact that
it had a (considerably) higher metric value as compared to the wireless NIC.
(And no, the wireless connection was not down.) It looks to me that this
trick is not very reliable. You can't really rely on it to specify the
default connection.
 
Is this so regardless of the metric tweak outlined below?

No. It's true if Windows automatically assigns a metric and you don't
change it.
Tried this trick with my two connections, and it didn't really work. After a
while it kinda defaulted to the wired connection regardless of the fact that
it had a (considerably) higher metric value as compared to the wireless NIC.
(And no, the wireless connection was not down.) It looks to me that this
trick is not very reliable. You can't really rely on it to specify the
default connection.

In my tests, it's 100% reliable. Windows always uses the connection
with the lower metric when two connections are identical in every
other respect.

To be sure what's happening, you have to look at every entry in the
route table, which you can see using the "route print" command.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
In my tests, it's 100% reliable. Windows always uses the connection
with the lower metric when two connections are identical in every
other respect.

What if they are not identical in every respect? I, for example, have a
wired and a wireless connection. I gave the wireless connection a lower
metric than the wired one, but after a while the Internet defaulted to the
wired one.

In other words, can one be sure that by toying around with the metric option
one can control Internet traffic? Or is it that no such sheer metric tweaking
will ever be capable of firmly establishing the default NIC, especially in a
scenario where the two or more NICs have wildly different capabilities and
speeds?
 
What if they are not identical in every respect? I, for example, have a
wired and a wireless connection. I gave the wireless connection a lower
metric than the wired one, but after a while the Internet defaulted to the
wired one.

In other words, can one be sure that by toying around with the metric option
one can control Internet traffic? Or is it that no such sheer metric tweaking
will ever be capable of firmly establishing the default NIC, especially in a
scenario where the two or more NICs have wildly different capabilities and
speeds?

In my tests, Windows always uses the connection with the lower metric
when two connections are identical in every other respect.

To be sure what's happening, you have to look at every entry in the
route table. Open a command prompt window (Start | Run | cmd) and run
this command to write the route table to a file:

route print >route.txt

Then, open the "route.txt" file and copy/paste it into a newsgroup
reply.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Steve Winograd said:
To be sure what's happening, you have to look at every entry in the
route table. Open a command prompt window (Start | Run | cmd) and run
this command to write the route table to a file:

route print >route.txt

Then, open the "route.txt" file and copy/paste it into a newsgroup
reply.

Here it is:

************************************************************
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...xx xx xx xx xx xx ...... Belkin 802.11g Network Adapter - Packet
Scheduler Miniport
0x3 ...xx xx xx xx xx xx ...... U.S. Robotics 10/100 PCI NIC TX - Packet
Scheduler Miniport
0x4 ...xx xx xx xx xx xx ...... U.S. Robotics 802.11g Wireless Turbo Adapter
- Packet Scheduler Miniport
=====================================================
=====================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.100 20
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.104 2
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.100 192.168.0.100 20
192.168.0.100 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.0.255 255.255.255.255 192.168.0.100 192.168.0.100 20
192.168.1.0 255.255.255.0 192.168.1.104 192.168.1.104 2
192.168.1.104 255.255.255.255 127.0.0.1 127.0.0.1 2
192.168.1.255 255.255.255.255 192.168.1.104 192.168.1.104 2
192.168.123.0 255.255.255.0 192.168.123.100 192.168.123.100 100
192.168.123.100 255.255.255.255 127.0.0.1 127.0.0.1 100
192.168.123.255 255.255.255.255 192.168.123.100 192.168.123.100 100
224.0.0.0 240.0.0.0 192.168.0.100 192.168.0.100 20
224.0.0.0 240.0.0.0 192.168.1.104 192.168.1.104 2
224.0.0.0 240.0.0.0 192.168.123.100 192.168.123.100 100
255.255.255.255 255.255.255.255 192.168.0.100 192.168.0.100 1
255.255.255.255 255.255.255.255 192.168.1.104 192.168.1.104 1
255.255.255.255 255.255.255.255 192.168.123.100 192.168.123.100 1
Default Gateway: 192.168.0.1
=====================================================
Persistent Routes:
None
************************************************************

Believe it or not, the default NIC is 192.168.0.100, i.e. the one with
metric 20. (I guess this can also be seen from the "Default Gateway" field
above). This happens to be the wired Ethernet card. I was counting on the
wireless (Belkin) NIC to act as the default, hence the lower metric (2).

Why is this happening? What am I doing wrong?

(Thanks for the replies btw.)
 
Here it is:

************************************************************
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...xx xx xx xx xx xx ...... Belkin 802.11g Network Adapter - Packet
Scheduler Miniport
0x3 ...xx xx xx xx xx xx ...... U.S. Robotics 10/100 PCI NIC TX - Packet
Scheduler Miniport
0x4 ...xx xx xx xx xx xx ...... U.S. Robotics 802.11g Wireless Turbo Adapter
- Packet Scheduler Miniport
=====================================================
=====================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.100 20
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.104 2
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.100 192.168.0.100 20
192.168.0.100 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.0.255 255.255.255.255 192.168.0.100 192.168.0.100 20
192.168.1.0 255.255.255.0 192.168.1.104 192.168.1.104 2
192.168.1.104 255.255.255.255 127.0.0.1 127.0.0.1 2
192.168.1.255 255.255.255.255 192.168.1.104 192.168.1.104 2
192.168.123.0 255.255.255.0 192.168.123.100 192.168.123.100 100
192.168.123.100 255.255.255.255 127.0.0.1 127.0.0.1 100
192.168.123.255 255.255.255.255 192.168.123.100 192.168.123.100 100
224.0.0.0 240.0.0.0 192.168.0.100 192.168.0.100 20
224.0.0.0 240.0.0.0 192.168.1.104 192.168.1.104 2
224.0.0.0 240.0.0.0 192.168.123.100 192.168.123.100 100
255.255.255.255 255.255.255.255 192.168.0.100 192.168.0.100 1
255.255.255.255 255.255.255.255 192.168.1.104 192.168.1.104 1
255.255.255.255 255.255.255.255 192.168.123.100 192.168.123.100 1
Default Gateway: 192.168.0.1
=====================================================
Persistent Routes:
None
************************************************************

Believe it or not, the default NIC is 192.168.0.100, i.e. the one with
metric 20. (I guess this can also be seen from the "Default Gateway" field
above). This happens to be the wired Ethernet card. I was counting on the
wireless (Belkin) NIC to act as the default, hence the lower metric (2).

Why is this happening? What am I doing wrong?

(Thanks for the replies btw.)

Thanks for posting the route table.

I see what you're saying, and I can't explain why it shows the Default
Gateway as 192.168.0.1. How do you know that the system is actually
using the wired Ethernet card for Internet access?

I'm trying to duplicate the behavior on my computer by specifying
various metric values for two network connections, but I haven't been
able to so far. I've opened the Status window for each connection,
and I'm looking at the Sent and Received packet counts to be sure
which connection it's using. I'll post a reply if I find out anything
more.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Steve Winograd said:
I see what you're saying, and I can't explain why it shows the Default
Gateway as 192.168.0.1. How do you know that the system is actually
using the wired Ethernet card for Internet access?

It is as simple as surfing into one of these MyIP sites that display yer IP.
On each of the two NICs I should get different IPs as they connect to
different/independent ISPs. (Note that I have made no significant changes to
IE's configuration, and thus I assume it uses the default connection.)

Anyway, even though, as a rule, the default NIC is the one with lower metric
(wireless Belkin), from time to time it just happens that the system defaults
to the other one (wired USR). So far I haven't been able to tell *when* that
happens. (And no, the wireless connection is NOT down when that happens.)

To be sure, given this behavior, I can't really trust this mechanism to
handle Internet routing, especially in case of very sensitive traffic.
Microsoft will have to do better than this "metric" tweak. At the very
minimum, I should be able to disable this annoying "failover" behavior, so
that just in case my Internet is *not* given by the dsired NIC, Internet
traffic should at least *not* go via other NICs. In other words, if the
Internet doesnt go through the desired NIC, then there should be no Internet
(at least for the application in question).

I don't really like this "default connection" idea. Each application should
firmly designate the NIC they use for Internet traffic from the get-go.
(Actually most of the newer applications are indeed designed with some "local
IP binding" option or other. Unfortunately IE isn't one of them.)
 
It is as simple as surfing into one of these MyIP sites that display yer IP.
On each of the two NICs I should get different IPs as they connect to
different/independent ISPs. (Note that I have made no significant changes to
IE's configuration, and thus I assume it uses the default connection.)

Anyway, even though, as a rule, the default NIC is the one with lower metric
(wireless Belkin), from time to time it just happens that the system defaults
to the other one (wired USR). So far I haven't been able to tell *when* that
happens. (And no, the wireless connection is NOT down when that happens.)

To be sure, given this behavior, I can't really trust this mechanism to
handle Internet routing, especially in case of very sensitive traffic.
Microsoft will have to do better than this "metric" tweak. At the very
minimum, I should be able to disable this annoying "failover" behavior, so
that just in case my Internet is *not* given by the dsired NIC, Internet
traffic should at least *not* go via other NICs. In other words, if the
Internet doesnt go through the desired NIC, then there should be no Internet
(at least for the application in question).

I don't really like this "default connection" idea. Each application should
firmly designate the NIC they use for Internet traffic from the get-go.
(Actually most of the newer applications are indeed designed with some "local
IP binding" option or other. Unfortunately IE isn't one of them.)

Here are two relevant Microsoft "Cable Guy" articles:

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

Default Gateway Behavior for Windows TCP/IP
http://www.microsoft.com/technet/community/columns/cableguy/cg0903.mspx

Please look at the section on "Dead Gateway Detection" in the second
article. Perhaps that's what's happening on your computer.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
Back
Top