Why is my DNS server timing out?

4

I just set up a DNS Server on my Windows 7, called SimpleDNS.

I added a zone for example sag.com and defined www.sag.com and sag.com to 192.168.1.2 (my Network IP Address) . the problem is when I try to ping sag.com the SimpleDNS logs says that it answered the request with 192.168.1.2, but the ping doesn't resolve anything . SimpleDNS logs:

 14:00:43   Request from 192.168.1.2 for A-record for www.sag.com
 14:00:43   Sending reply to 192.168.1.2 about A-record for
 www.sag.com: 14:00:43   -> Answer: A-record for www.sag.com =
 192.168.1.2 14:00:43   -> Authority: NS-record for www.sag.com = mehr-pc

nslookup yields:

 C:\Users\Mehr\Desktop>nslookup www.sag.com DNS request timed out.
     timeout was 2 seconds. Server:  UnKnown Address:  192.168.1.1

 DNS request timed out.
     timeout was 2 seconds. DNS request timed out.
     timeout was 2 seconds. DNS request timed out.
     timeout was 2 seconds. DNS request timed out.
     timeout was 2 seconds.
 *** Request to UnKnown timed-out

The DNS server IP is 192.168.1.2 , and Access point address : 192.168.1.1

What should I do?

Behrooz A

Posted 2011-11-12T10:18:39.917

Reputation: 41

Answers

2

Your nslookup shows your Windows 7 computer is using 192.168.1.1 as it's DNS server, not 192.168.1.2. You need to change the DNS server in the TCP/IP properties of the NIC.

joeqwerty

Posted 2011-11-12T10:18:39.917

Reputation: 5 259

it should should DNS server address in DHCP , from 192.168.1.1 ( the access point ) , I set the DNS in access point , so I think it's okay that the address of DNS server be 192.168.1.1

my current DNS server which works perfect , is set via ISP DHCP in access point and in my computer set to 192.168.1.1

and in TCP/IP of the NIC , it uses DHCP too , not manual IP assigning. you mean every node that joins the network must set their DNS manually ? I don't think so this is the right answer because it uses DHCP from an access point which the DNS server is set in it. – None – 2011-11-12T13:18:50.803

If you've configured 192.168.1.1 to use 192.168.1.2 as it's forwarder then that's OK, but it's not working as evidenced by your nslookup. The nslookup is timing out. Try running nslookup for www.google.com and see if that works. Then try changing your Windows 7 computer to use 192.168.1.2 as it's DNS server and run nslookup for www.sag.com and www.google.com and see if that works. The results of these tests should help you narrow down the problem. – joeqwerty – 2011-11-12T13:31:55.453

C:\Users\Mehr\Desktop>nslookup google.com Server: UnKnown Address: 192.168.1.1

Non-authoritative answer: Name: google.com Addresses: 209.85.148.106 209.85.148.147 209.85.148.99 209.85.148.103 209.85.148.104 209.85.148.105 – None – 2011-11-12T13:33:27.790

It works with google. I tried it with my Android phone too. nslookup-ed and the same answers in computer – None – 2011-11-12T13:34:24.450

So 192.168.1.1 is working for external names but not internal names. Is 192.168.1.1 configured to use 192.168.1.2 as it's DNS forwarder? The DNS queries for sag.com have to get to 192.168.1.2 or it's not going to work. – joeqwerty – 2011-11-12T13:36:02.047

I think you misunderstood my problem , Its two situations , 1- like now , access point gets DNS servers from ISP DHCP and everything go right. 2- I configure the access point to use 192.168.1.2 ( my computer ) as it's primary DNS . and disconnected from internet , secondary DNS leaved blank . My situation is second one. so every node must get 192.168.1.2 as their DNS from the access point DHCP. am I wrong? – None – 2011-11-12T13:44:50.257

No, every node doesn't need to have 192.168.1.2 if 192.168.1.1 correctly forwards DNS queries to 192.168.1.2... which is where the problem seems to be. It sounds like 192.168.1.1 isn't forwarding queries to 192.168.1.2 and you can confirm that by running a packet capture on 192.168.1.2. Run the capture on 192.168.1.2 and run nslookup from your Windows 7 computer for both www.google.com and www.sag.com and look for those queries coming in to 192.168.1.2 in the capture. If you don't see them then that means they're not getting there, which means that 192.168.1.1 is not forwarding to 192.168.1.2. – joeqwerty – 2011-11-12T14:07:08.700

the whole network is a website located on a computer with the IP associated with the IP in DNS record of www.sag.com , the access point doesn't connected to internet , and everyone who connect to network can Only visit www.sag.com. when somebody tries to access www.sag.com , it send request to the DNS server ( 192.168.1.2 ) and DNS server's Logs show that somebody requested information about www.sag.com and DNS server replies to the request by sending back 192.168.0.2 . but doesn't work – None – 2011-11-12T14:56:02.993

OK, so your network is 192.168.1.0/24, right? And your web server is 192.168.0.2, right? If so, then your web server ip address is on the wrong network (subnet), it should be on the 192.168.1.0/24 network, not the 192.168.0.0/24 network. Either that or the DNS A record for www .sag.com is wrong. If the DNS A record is 192.168.0.2 and the web server is 192.168.1.2 then you need to fix the DNS A record. – joeqwerty – 2011-11-12T15:16:56.523

I mistyped 192.168.1.2 , the correct is 192.168.0.2 , sorry :( – None – 2011-11-12T17:04:20.053

OK, so what ip adrress does the access point have? What ip address does the DNS server have? What ip address does the web server have? What ip address does the Windows 7 computer have? What ip address is the A record for the web server? What ip address is the access point using for the DNS server? – joeqwerty – 2011-11-12T17:07:38.257

damn me :)) I really should apologize , access point address : 192.168.1.1 My computer which DNS is installed on : 192.168.1.2 in the access point , primary DNS server is set to 192.168.1.2 a second node may join and have address 192.168.1.3 – None – 2011-11-12T17:24:00.623

1

run:

nslookup sag.com (ip of dns server)

the above command will forcefully try to resolve name from your dns. then analyze the result that what it says to you.

Verify that the DNS server is running and LISTENING on required ports. verify that port 53 (UDP) is open.

The difference between ping and nslookup is that when ping is submitted to OS, the OS tried to resolve name from all possible way (through lmhosts, hosts, dns, and total of 7 ways), but nslookup only resolves name from provided dns server.

Farhan

Posted 2011-11-12T10:18:39.917

Reputation: 391

it listening on port 53 , it logs show that it answers the requests. I'm gonna run the command and copy here the results and logs , thank you for your reply – None – 2011-11-12T10:26:46.743

I just edited my post – None – 2011-11-12T10:37:18.103

what is IP of your DNS server? and what is the DNS server set on your local system? and i told you to run command e,g,"nslookup sag.com 4.2.2.6",,you have to replace 4.2.2.6 with your dns server ip address. – Farhan – 2011-11-12T10:39:39.093

C:\Users\Mehr\Desktop>nslookup www.sag.com 192.168.1.2 Server: UnKnown Address: 192.168.1.2

Name: www.sag.com Address: 192.168.1.2 – None – 2011-11-12T10:51:08.337

your DNS server ip is 192.168.1.2 ? – Farhan – 2011-11-12T10:53:19.563

yes I edited my post before : the DNS server IP is 192.168.1.2 , and Access point address : 192.168.1.1 – None – 2011-11-12T10:55:41.827

do you have any other computer in network, from which you can run this command? because running this command on the same machine might create confusion. – Farhan – 2011-11-12T11:10:00.493

I tried with my Android Handset , did run nslookup command and results were Okay ... but still not resolving in browser or ping or nslookup without IP address assigning – None – 2011-11-12T12:03:33.520

let us continue this discussion in chat

– None – 2011-11-12T17:20:53.903

1

Setting up a DNS server is one thing using it another one.

It may sound trivial, but it is necessary to explicitly enter it to be used.

So the first step to do is Frank's approach, and if that works, but the same command without the IP of the DNS server doesn't, it means that your DNS server isn't used per default.

glglgl

Posted 2011-11-12T10:18:39.917

Reputation: 1 327

Dear glglgl , according to your post and nslookup , it looks that my DNS server doesn't act as primary or default one , is it a problem in my access point where I changed primary DNS server ( and leaved secondary as blank) ? – None – 2011-11-12T11:07:58.643

Seems so. Normally your access point should distribute its DNS settings via DHCP. Why it doesn't? N idea. But maybe it helps to set the NS data at the clients - depending on their number. At least, it is worth a try. – glglgl – 2011-11-12T18:31:37.073

It's for a shop, customers can't get forced and don't have enough knowledge to do it. also , the weird thing is on each try DNS responses to request ( as shown in dns logs ) but nothing to show in nslookup and ping or in browser – None – 2011-11-12T18:35:01.407