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

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.


Solution 1:

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.

Solution 2:

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?