When a PC has both a wired and a wireless connection, how is information transferred?

If multiple interfaces are up there are two issues. First one is which interface has gateway and what is the interface order.

I'm assuming you're using Windows O.S. In command prompt (type "cmd" in Run window) type route print and you should see something like this:

routeprint

(the headers are in you o.s. language, mine is Turkish)

Which interface has the gateway option, actually which interface has the routing information for destination 0.0.0.0, mask 0.0.0.0 is the actual outgoing door...

{ Edit: Observe that I have a route line that is

Destination: 192.168.8.0 Mask: 255.255.248.0 and Gateway 192.168.24.2

at the bottom. That says when i need to access 192.168.8.0 network, i have to pass throug the 24.2 gateway. Besides, there are no entries in main table for 192.168.24.0 network, that was an experimental entry over another NIC }

When you have multiple route informations for that destination {edit: 0.0.0.0} and each one is different from each other or just two different gateways, you're doomed. Network will start losing some packets...

When you have multiple route informations for that destination but one gateway for each (which is your case that your gateway will be your modem i guess, which is your dhcp server, it'll assing different ip addresses for each interface but same information for default dns and default gateway) then there is an order:

order

Your o.s. will treat your up and running interfaces with this ordering. So if you wireless interface is on the first line and connected, your o.s. will use that interface for network communication and vice-versa.


I was wondering this myself when I installed a wireless NIC in my system. I did some test (in Windows XP) and found out that if you have both a wired and wireless connection (both independently configured and functioning), then Windows will prioritize the wired connection.

In other words, when the cable is disconnected, it will use the wireless connection, but when you plug in the network cable, the wireless connection is essentially stopped (not disabled, just no longer used, that is, zero bytes transfered in either direction) and the wired connection is used instead.

When my mother got a laptop, I repeated the test with it (in Windows 7) and got the same results.

For the record, this behavior makes sense. A wired connection will be faster and more secure than a wireless one. Why use the wireless one if the wired one works?

How does[sic] my Lan and Wlan interfaces know to send request to web?

The network adapters do not decide that, the operating system does. Windows decides which interface to send and receive from.

(I could not test it, but I do not believe that the choice of which adapter to use depends on the speed. I suppose it could use a faster wireless connection over a slower wired one, but that would be a bizarre setup indeed. Also, note that I am talking about a wired vs. wireless connection as per the question, I am not discussing multiple wired connections and redundancy. In the case that the prioritized wried connection goes down, obviously Windows switches over to the wireless one.)