1

I have a Windows Server 2012 as a DNS and a DHCP server. Now, when a client connects he gets wrong DNS servers from the DHCP server. Not sure where these came from but I'd like to give the clients the server's IP as DNS servers address.

I've set it up once in the past in Server 2008 but I can't remember now where I set the DNS server address in DHCP.

So... where can I change the addresses?

4

It's not the likeliest explanation, but have you checked to make sure that the clients are getting DHCP leases from the DHCP server you expect, and not from another (rogue) server on your network?

The first place to look would clearly be the configuration on the server, but If you've checked the configuration and it seems to be correct but the client is still accepting a lease that doesn't look like what you think you are sending, it is a possibility.

Sometimes it helps to break out the sniffer software and see what's actually coming and going across the wire, and from whom. You can at least take a look at what the server is sending out in its DHCPOFFER and any decent sniffer software will dissect the packets for you and show you the option values being sent with the lease offer.

  • 2
    A Windows machine will tell you what DHCP server it received its config from, via "ipconfig /all" - no need to even break out Wireshark – mfinni Jan 27 '13 at 22:25
  • ipconfig says that the DHCP server is correct. The client has also got a correct static IP from the server. (By the way, there's no client side setting of DNS) – MikkoP Jan 28 '13 at 13:50
  • That being the case, I would suggest you look in the lease packet to see what options are actually being sent with the offer, and what values the option fields contain. – Michael McNally Jan 28 '13 at 18:42
2

In the DHCP Scope options add option 6 - DNS Servers and add the appropriate DNS server(s).

  • Tried that but I didn't get it working. I restarted the server, modem (DNS is set to 192.168.0.180 in the modem which is the server) and the client (also tried ipconfig /release and /renew) but it didn't do anything. ipconfig on the server says 127.0.0.1 as a name server. In DHCP the option 6 is set to 192.168.0.180. The forwarders in DNS server are set to 8.8.8.8 and 8.8.4.4. ipconfig on clients get those Google DNS servers. What's wrong? – MikkoP Jan 27 '13 at 19:15
0

As mentioned, the official way is to set a forwarder up that points unknown DNS requests to an outside server, but I found it also worked by ignoring that and setting an external DNS server in the network settings for your LAN connection, just as you would any normal PC.

It seems that in the absence of other info, Server 2012 pushes that setting as the one it gives to machine using DHCP. Is that configured correctly?

0

I had built a new server and configured DHCP on it and set the options correctly and pointed the 006 DNS setting to the new server but DNS kept reverting to the old server IP address. Nothing I did/changed would give me the correct results. (The old DHCP server was disabled and unistalled) I tried uninstalling then reinstalling DCHP but DNS kept going back to the old servers IP address.

The solution for me was to designate a new directory for the DHCP server database. Under the Scope properties I picked a new database path and then rebuilt the scope with all the options. Once I completed rebuilding the scope all workstations on the network received the correct DNS server IP address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.