DHCP giving wrong DNS servers

15,662

Solution 1

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.

Solution 2

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

Share:
15,662

Related videos on Youtube

MikkoP
Author by

MikkoP

I'm a student living in Finland, interested in mathematical subjects, programming and computers.

Updated on September 18, 2022

Comments

  • MikkoP
    MikkoP almost 2 years

    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?

  • MikkoP
    MikkoP over 11 years
    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?
  • mfinni
    mfinni over 11 years
    A Windows machine will tell you what DHCP server it received its config from, via "ipconfig /all" - no need to even break out Wireshark
  • MikkoP
    MikkoP over 11 years
    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)
  • Michael McNally
    Michael McNally over 11 years
    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.