Networking – Connect to two WiFi networks – use one for internet, the second for LAN-only connections

ad hoc networkinternetwireless-networking

I have a TP-LINK router broadcasting Internet, and I connect to it via my internal WiFi chip in my laptop.
I also have an external TP-LINK WiFi chip which cannot broadcast WiFi, even not Ad-hoc.
I have a Motorola Xoom [android 4.0.3] tablet which can broadcast Ad-hoc.
I connect to the Motorola Xoom via its Ad-hoc capabilities via my external TP-LINK chip, and the internal connects to the router.
The android tablet doesn't have its WiFi independent internet connection, so the Ad-hoc network does not give me an internet connection.
The reason I do it is because the router is far and between the computer and tablet I get poor performance [less than 500kbps and high ping].

enter image description here

The problem is: When both connections are established, I can ONLY access the Tablet, and although my Windows 7 64bit says that there's no internet connection [and the internet does have a connection] – it doesn't give me internet connectivity, it "tries" to connect via the ad-hoc connection.

How can I configure my network so I'll get an internet connection from my internal WiFi, and LAN only via external WiFi, without interference?
Thank you!

Best Answer

on the windows PC open a command prompt and run the following command:

route PRINT

This will display your routing table on the laptop. Look for the entry that begins with 0.0.0.0 it will appear similar to the following:

Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.188.0.1   192.168.0.101       20

This should be pointing to the default gateway of your wireless router that is serving the internet connection. Chances are that it is currently pointing to the AD-HOC connection or you may see two entries for 0.0.0.0 with different metrics. The lowest metric is considered the 'best route' to the 0.0.0.0 network (which is your default gateway to reach networks that are not directly connected to your PC i.e. the internet) You can use the command:

route CHANGE 0.0.0.0 MASK 0.0.0.0 192.168.0.1 METRIC X

Replace X with a lower number than both existing 0.0.0.0 entries to make it the preferred path to reach the internet. Also replace 192.168.0.1 with the internal IP address of the router. This will not route your internet traffic from the Xoom to the internet through the gateway, however it will allow you to access both your network and the tablet at the same time.