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.

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?

share|improve this question
    
What OS are you using? –  Nikolay Aug 6 '13 at 19:23
add comment

2 Answers

"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 127.0.0.1 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.

share|improve this answer
add comment

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

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

route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.254 "adds EVERYTHING to wifi"

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

route -p add 10.136.0.0 mask 255.255.0.0 10.131.6.1 "adds 10.136.0.0 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.

share|improve this answer
add comment

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.