Re: How to switch between WLAN network and LAN network ?
- From: DanS <t.h.i.s.n.t.h.a.t@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Apr 2006 17:14:28 -0500
martinca20@xxxxxxxxxxx (Martin Caldwell) wrote in
news:443a923b$0$11061$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxx:
My laptop has a Centrino CPU with a built-in WLAN. On the other hand
my laptop is connected to a (wired) LAN as well. Through both of them
I can connect the Internet.
However I would prefer to connect the Internet through LAN (because)
this way it is faster. How do I detect which network is used by
default by WinXP when I type an URL into the browser?
How do I tell WinXP to switch to LAN if WLAN is the current
preference?
Martin
Martin,
Both network interfaces are active at the same time ?
That is usually not desirable if they are connected to the same physical
network AND exist in the same subnet.
If the LAN is 192.168.1.0/255.255.255.0 then both cards will be in the
same network. It would be better to disable the one you don't want to use
through the Network Connections Properties. Simply right-click the one to
disable and select disable. Do the same thing to re-enable it when you
want to use that one instead.
Alternately, it's simply a matter of changing the default gateway of the
PC to select the card you want to use. The only issue is that the IP
addresses of each need to be the static to make it easy.
The default gateway is where IP traffic is sent when it is not destined
for the local subnet, the subnet the NIC is located in, AND there is no
pre-defined route for it in the routing table.
When your PC looks at a destination, it first looks to see if it's for
the local subnet. If not, it then checks the routing table to see if
there's a route for it. If not, it doesn't know what the hell to do with
it so it sends it to the default gateway.
You can see all of the route's by opening a cmd prompt and typing:
route print <press enter>
The first one printed should always be the default gateway route, or
0.0.0.0.
These can be changed 'on the fly' with no rebooting required, even back
to Win98 (if done from the command prompt and not the control panel UI).
To switch back and forth between gateways-
In this example, I'm showing 2 NICs with 2 DIFFERENT subnets.
NIC1 Wired LAN - 192.168.1.2/255.255.255.0 Def.GW-192.168.1.1
NIC2 WLAN- 192.168.100.2/255.255.255.0 Def.GW-192.168.100.1
Create 2 .bat files on the desktop. Name one LAN-GW.bat and the other
WLAN-GW.bat.
Open LAN-GW.bat for editing.
Add these 2 lines to it:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.1.1
Save and close the file.
The 192.168.1.1 may be different, it should be set to whatever the wired
LAN gateway is.
Now open WLAN-GW.bat for editing.
Add these 2 lines:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.100.1
(Again, the last IP is the gateway IP for the WLAN, may be different.)
Save and close the file.
Simply execute the .bat file for whichever gateway you want to use.
Running WLAN-GW.bat will get you through the wireless and LAN-GW.bat will
take you through the wired card.
It should work even if both NICs are in the same subnet.
Playing with the routing table, you can also make some of the traffic go
one way and some the other, IF you know the destination IP's.
Regards,
DanS
.
- Prev by Date: Re: Computer's Workgroup or Domain Name
- Next by Date: Re: How to switch between WLAN network and LAN network ?
- Previous by thread: Re: How to switch between WLAN network and LAN network ?
- Next by thread: Re: How to switch between WLAN network and LAN network ?
- Index(es):
Relevant Pages
|