I have a scenario where I'd like to use my laptop's Wi-Fi card for Internet traffic, but use my LAN connection for all local traffic. Basically, to make a long story short, our corporate Internet access is down so I'm using a Wi-Fi backup connection.

The problem is that I want DNS lookups for Internet traffic to be handled through the Wi-Fi card, but DNS lookups for local traffic to be handled by the LAN connection. If the Wi-Fi card handles all DNS lookups, then it uses external IP addresses or is unable to resolve internal names. If the LAN connection handles all DNS lookups, then it can only resolve internal addresses because the Internet is currently down.

I tried using the solution where I use the Advanced tab and modify the Metric value so the Wi-Fi network is priority. This works beautifully for being connected to both networks simultaneously while still having the Wi-Fi network handle Internet traffic. However, I still can't figure out how to get DNS lookups to work the way I want them. I also tried specifying custom DNS resolvers, using an internal network as primary and Google's Public DNS as secondary - however this still resolves everything internally.

Is there any way to get this to work?

  • What OS are you using? – VL-80 Aug 6 '13 at 19:23

"If the Wi-Fi card handles all DNS lookups..." WiFi card does not handle DNS lookups. Programs do it. It can be browser which requests to resolve a host name to IP address. It can be another program.

I would install caching DNS server on the laptop and configure it to use different DNS servers for resolving names in different DNS zones. So that, you will have as your DNS server. Now, it really depends on which OS are you using. There can be BIND (which can be too much overhead for temporary solution or might be fine). Anyway - general idea is to have caching DNS program which can be configured to use different DNS servers to resolve hostnames from different zones.


create a batch file with static routes settings, i had this scenario too and this solves the poblem pretty fine:

route delete (gets rid of default route for "everything else"

route -p add mask "adds EVERYTHING to wifi"

route -p add mask "ädds internal addresses in the 158.118 range to my own network router"

route -p add mask "adds segment to my internal use also"

so there only 158.118 and 10.136 are solved internally and everything else is solved by the wifi router (you can create another batch to UNDO THIS" or use some utility like netsetman so it runs it automatically when you are in your work and undoes it when you are at your home.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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