Avatar of beardog1113
beardog1113
Flag for China asked on

how use different DNS servers for different domains on windows 7

hello experts
DNS1 is configured on my NIC adapter, there is a zone domain.com on DNS1, this zone is only for cheating someone the host resolve result is incorrect, if i want to access domain.com, i need change to DNS2 manually every time, that is not convenient.
so i  want to know if there is a method on windows 7, DNS1 is my primary server, once i access domain.com send the query to DNS2? something like route add, different destination go to different gateway.

thank you
Windows 7DNSNetwork Management

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
EVeuger

On DNS1 you could set a conditional forwarder to DNS2 for the domain.com.
IanTh

you will need to do route add x.x.x.x -p (permanent)
beardog1113

ASKER
hi EVeuger
but i need the wrong resolve result on DNS1, for cheating.

thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
EVeuger

I didn't understand that part about cheating, what exactly you want to do there?
EVeuger

Do you want to resolve domain.com only for yourself?
IanTh

hmm yes spying would be a better phrase I think
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
beardog1113

ASKER
ok, let say as that
1. DNS1 is not managed by me, so i can't configure forwarder on it.
2. DNS1 is configured on My DHCP, and we must using it as DNS1.
3. result about domain.com from DNS1 is incorrect, but from DNS2 is correct.
4. access network via DNS1, once i access xxx.domain.com, send the name resolve request to DNS2, not DNS1.

does it possible do something on my local laptop?

thanks
EVeuger

You could add it to your hosts file, name resolution looks at your hosts file before the DNS server.
Premkumar Yogeswaran

Yes Eveuger is correct.
You need to configure the host file as below

domainname         DNS2_IP_Address

Additionally refer this E-E Article for DNS function
https://www.experts-exchange.com/Networking/Protocols/DNS/A_323-DNS-Troubleshooting-made-easy.html

Regards,
Prem
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
footech

How about configuring your NIC statically to use DNS2 (you could still get your IP from DHCP)?  Or do you need to use DNS1 all the time except when trying to reach the specific domain?
beardog1113

ASKER
hello footech
thats right, i need DNS1 all the time, except accessing specific domain.

and i can't edit host file, because domain.com i mentioned is a huge site, aaa.domain.com and bbb.domain.com are totally different IP address.

as you know "route add" can help me select gateway with different destination, i just want to know if something like this for DNS query.

thanks
ASKER CERTIFIED SOLUTION
Qlemo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
beardog1113

ASKER
I've requested that this question be deleted for the following reason:

looks like there is no solution for my question.<br /><br />thanks for experts reply.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Qlemo

Even "You can't do that" can be a valid answer. We have shown (probably) all possible ways to do what you want, so it would be appropriate to accept either "You can't do it" (http:#a38023353) or the suggestions, or both. You also never explained why DNS forwarding isn't an option.