If a computer is connected to internet via wireless and lan both, which way Internet traffic would flow?

10

How does this actually work? How different ip addresses on ethernet adapter and wireless adapter are handled for internet data? I know these ip are translated in NAT table but the whole process involving ethernet and wireless adapter together is not clear to me.

understack

Posted 2010-01-30T21:44:57.743

Reputation:

2this is not programming-related, and should be moved to superuser.com – pixeline – 2010-01-30T21:50:21.493

1In my experience, if you have an application open going through the wireless, then you connect a wired connection and open a new application, you can use both, but I expect it depends on the OS at that point. – James Black – 2010-01-30T21:53:54.123

@James: works exactly this way on Linux, used that some times for downloading of big files through LAN&WLAN. – whitequark – 2010-01-31T00:19:21.590

Answers

8

If (for packet that is sent by your machine) destination is not in LAN (DestAddress & Netmask != YourLANAddress & Netmask) it will be redirected to your default gateway, and if both of your devices are connected to the same network (if they have IP addresses belonging to same network actually; it is determined by the same algorithm) packet will travel through device with a lower metric.

whitequark

Posted 2010-01-30T21:44:57.743

Reputation: 14 146

That's interesting. Can you elaborate more on the metrics subject? How are they configured, by default, between wireless and LAN adapters? Or are they dynamically configured by the OS after identifying the fastest path? – cregox – 2010-03-31T21:15:38.970

AFAIK all 'real' network adapters (e.g. not TAP or loopback) get the same metric; and the OS would never do such a speed test at least because it cannot rely on some external host to be second measurement endpoint. – whitequark – 2010-04-13T02:14:04.740

without using the @ sign I could never see you "answered" my comment, unless I come here, like I just accidentaly did. now I don't even remember what I meant myself! :P – cregox – 2010-09-21T20:17:56.367

@Cawas: well, I hadn't knew about @ feature that time. :) – whitequark – 2010-10-02T17:09:32.213

3

It's entirely dependent on how your network interfaces are configured. The usual place where this is done is in a routing table, which lists the ethernet addresses of the adjacent nodes. Both might be used at once, or just one, depending on what this table says.

For example of one such configuration in MacOSX, see my question here: How can I tell which network interface my computer is using?

Ether

Posted 2010-01-30T21:44:57.743

Reputation: 1 007

0

I believe that one of the devices is set as a 'default' device. The other will basically sit there and do nothing. Double-click the little tray icon for your internet connection, it will tell you which one it is using...

IAbstract

Posted 2010-01-30T21:44:57.743

Reputation: 294

0

From my experience in Windows XP (from having the network activity icons in the notification area) it seems smart enough to use the faster LAN connection as soon as it becomes available. Turn on the icons and see for yourself.

user13141

Posted 2010-01-30T21:44:57.743

Reputation: 311