Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I just set up an internal http server for internal use (I set up Redmine), in a small network (30 or so PCs).

I set up the http server on a virtual box ubuntu, that runs also the DNS server (bind). In the DNS lookup I added the Redmine server name (redmine.engserver <-> 192.168.1.14) and as forwarders the outside ISP DNS IP adresses.

I am using a small wi-fi router (ASUS RT-N66U) as DHCP (and as gateway). In the DHCP config page I set up as DNS the ubuntu server IP (it is fixed 192.168.1.14). Now when I connect a new PC to the network, the DHCP router issues its new IP and as DNS servers it issues: primary: 192.168.1.14 (ubuntu machine) and seconary 192.168.1.1 (the router itself).

ipconfig /all Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DHCPv6 IAID . . . . . . . . . . . : 248539109 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-15-AA-3F-D0-67-E5-49-A7-EF

DNS Servers . . . . . . . . . . . : 192.168.1.14 192.168.1.1 NetBIOS over Tcpip. . . . . . . . : Enabled

Before changing the DHCP setting on the router, I would always get only one DNS server: 192.168.1.1 (which uses probably DNS forwarding to external public DNS services).

The problem is this: If in my browser I type www.google.com, it works all the time. If in the browser I type http://redmine.engserver/ it works most of the time, but sometimes it ends up with a yahoo page search or something else. In the DNS cache it shows as (Server not found). ipconfig /displaydns

I looked with wireshark and it seems like sometimes the client PC interrogates the secondary DNS (192.168.1.1) instead of the first 192.168.1.14. Obviously this one is a public domain and it does not have the redmine.engserver entry.

What is wrong in this configuration? Is it even legitimate to have 2 DNS (one internal and one forwarded by the router) which are inconsistent? Is there another way to have a local name service in a small office network? Why is the router DHCP issuing itself as DNS?

share|improve this question

3 Answers 3

You've already figured this out. Half of your DNS requests go to the router instead of your internal DNS server (which cannot resolve 'redmine' internally.) Your router should only assign 192.168.1.14 as a DNS server in DHCP. In a network of your size, you can probably get away with only a single DNS server. (This should be an option in the configuration.)

Is it even legitimate to have 2 DNS (one internal and one forwarded by the router) which are inconsistent?

No, it's very bad practice for the reasons you are experiencing.

Why is the router DHCP issuing itself as DNS?

Default settings for DHCP on any router will do this. I suppose it could be some complete utter crap of a device that doesn't allow you to disable it. If so, toss it in the trash at once and replace it with something that gives you control of your network.

share|improve this answer
    
It seems like the dhcp of that router always sends out 2 DNS's, one of which is itself... kind of odd. Anyway, I finally solved the issue by activating a WINS server and using the "hostname" broadcast by the server with netbios. This way by typing servername it resolves the IP not using the DNS but using the netbios. –  Luca Nov 21 '12 at 1:43
    
if you are running DNS on the ubuntu box,just enable dhcp there as well, then you can totally control it. if you can't disable dhcp on the router, get one where you can. –  Doon Jun 26 '13 at 2:09

FYI- I am seeing the exact same issue on my ASUS WiFi router. I have an Asus RT-N16. I also configured the dhcp server to give clients a different DNS server. However, this asus insists on also giving clients the router's 192.168.1.1 address. This is bad for the reasons you mentioned.

Is there any way to use dhcp on the router, but not its DNS? I'm wondering if it might be better to just re-flash the router with dd-wrt.

share|improve this answer

If you have DNS on the ubuntu box, you can also remove the DNS entry from the router's DHCP (so it gives only the router itself as DNS to the client) and add the ubunto as primary DNS server and a fallback as secondary DNS server.

share|improve this answer

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.