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

multi-homednetwork-interfaceroutingwireless-networking

My PC has two connections (wireless and wired) simultaneously. Both of them have an internet connection.

In this situation, how does it connect to the internet? How do my LAN and WLAN interfaces know to send requests to the web?

Best Answer

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.

Related Question