Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Not sure if the question is correctly phrased. Here's my setup: because I'm moving around a lot,, I don't have fixed line Internet access (such as ADSL). However I have a LAN for interconnecting a number of machines - through 100Mb cables. To access the Internet, I use one of those pocket-WiFi devices that allows up to 5 devices to be connected and uses mobile broadband (3G and HSPA). what I'm finding is that if I'm connected to the local network, I can't connect to the Internet on the same machine.

Some research on this site suggested that by adjusting the routing cost, I could get the WiFi link to be preferred. It also suggested I should remove the gateway address. I couldn't figure how to do this (as it was a DNS setup so I changed the actual gateway address to a different one than in the properties.

It seemed to work (at first), but now it seems to not work (intermittently). I'm using Windows-7 (predominantly)

My question is, given my setup, how can I set up the two NICs (cable and wireless), so that if look up an internet address it will use the WiFi and if I want a local address it will use the cable?

share|improve this question
    
What does the 'pocket-WiFi device' do? Has it a Ethernet port? Does it have a fixed IP address of its own? Does it act as DHCP server? ... (A link to the PWD's manual would do wonders to help answer this question). –  Hennes Jul 31 '12 at 13:06
    
The PocketWiFi is a HUAWEI E585 huaweidevice.com/worldwide/… It does act as a DHCP Server (although it doesn't seem to be able to set permanent leases). It doesn't have an Ethernet port. My immediate problem seems to have been solved by @Rain's answer below. –  PaoloFCantoni Aug 2 '12 at 4:28

2 Answers 2

up vote 1 down vote accepted

The problem here is that Windows favors wired connections before wireless connections, and quite honestly, this makes sense as a default.

To fix this, navigate to Network and Sharing Center > Change Adapter Settings (or simply type ncpa.cpl in Run). Next, hit Alt to bring up the menu and click Advanced > Advanced Settings.... Then, simply reorder your network connections on the Adapters and Bindings page so that your Wireless interface is first.

A reboot may be required for the settings to go into affect, but it should work.

share|improve this answer
    
Seems to have... Thanks –  PaoloFCantoni Aug 2 '12 at 4:27
    
I now have a related issue: superuser.com/questions/456590/…. Anyone got a solution there? –  PaoloFCantoni Aug 2 '12 at 6:01

The easiest option is to add a router to your setup if possible. Does the pocket WiFi have a LAN port? If so just throw a router in between your LAN and Internet. Plug the pocket WiFi device in to the WAN port of the router, set the WAN port to DHCP, and the rest of the routing should be automatic. But I'm guessing the problem your facing is that there are no ports on the device.

If there's no way to work a router in there, then we'll have to add a route that tells your computer where to look for local computers, and tell it not to look for anything else there.

Let's assume that your LAN is running 192.168.1.0, and your WiFi device is handing your computer 192.168.200.10. These will have to be on different subnets to work, so if your WiFi is in the same range as the LAN change whichever network is easiest to change.

Open up a command prompt and run ROUTE PRINT. This will give a table of your computer's current routes. Look for an entry like this:

0.0.0.0    0.0.0.0   192.168.1.1   192.168.1.100

This is assuming that there is a router on your LAN at 192.168.1.1, and your computer is at 192.168.1.100 on the LAN. If there is no router, you'll see On-link instead of 192.168.1.1.

We don't want this route. It's telling your computer that it can find any address in the whole wide world (0.0.0.0) by going through the 192.168.1.100 interface. Since this simply isn't true, we need it to realize that it can find any address in the whole wide world by using 192.168.200.10.

Try this: ROUTE ADD 192.168.1.0 255.255.0.0 192.168.1.1 192.168.1.100

That should tell your computer where to look for machines on the LAN. This won't persist through reboots however, you'll have to add a -p flag for it to stick.

Now, to be honest, this is where I run out of knowledge. I'm not sure if we need to delete the original route, or if we can change it instead. I can't quite make sense of the syntax and how it would differentiate between the two 0.0.0.0 destination routes, or if two of them will even exist. I wish I was set up right now to do some testing. This might at least get you going, or get someone with more knowledge in here to correct me.

You can find some more information here:

Command Syntax

Basics of route tables in Windows

Multihoming

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.