Wi-Fi for Internet and LAN Domain Network - Multi-Sourced DNS Resolution

0

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?

mellamokb

Posted 2013-08-06T19:05:26.150

Reputation: 215

What OS are you using? – VL-80 – 2013-08-06T19:23:08.493

Answers

0

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

VL-80

Posted 2013-08-06T19:05:26.150

Reputation: 3 867

0

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.

arana

Posted 2013-08-06T19:05:26.150

Reputation: 570