TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.47k stars 431 forks source link

DHCP: Windows unable to acquire DHCP lease from Technitium #228

Closed LordMike closed 3 years ago

LordMike commented 3 years ago

This is odd. I've just set up a Raspberry Pi 4 w/ Technitium to be my new dedicated DNS / DHCP server, and I was excited to start doing DHCP with it (been running in docker so far).

My iPhone, laptop and Windows 10 Pro desktop are all unable to get a lease from the server. The server logs that it is offering (the same) addresses over and over - to no avail. I've made a packet capture.

The capture covers my desktop (Win10), during the course of a ipconfig /renew "vEthernet (LAN)" command which renews just the one interface.

I'm seeing:

In this case, the IP's are:

The command I run on Windows, is: ipconfig /renew "vEthernet (LAN)", and it outputs:

An error occurred while renewing interface vEthernet (LAN) : unable to contact your DHCP server. Request has timed out.

Technitum-DHCP.zip

In the event log (Microsoft-Windows-Dhcp-Client), I can see the following:

Your computer was not able to renew its address from the network (from the DHCP Server) for the Network Card with network address 0x2C4D54CF135D. The following error occurred: 0x79. Your computer will continue to try and obtain an address on its own from the network address (DHCP) server.

Googling says this is a client issue, but I'm seeing this on multiple devices (incl. iPhone). :|

LordMike commented 3 years ago

I was able to enable more logging in that log, and found events indicating an Ack timeout.. I find this strange as all packets I see are ~10ms apart.. :|

ShreyasZare commented 3 years ago

Thanks for the feedback. I checked the pcap file and there are 2 transactions in there:

So, on your desktop, what you can do is release the IP address first using ipconfig /release and they try to renew back using ipconfig /renew. This should fix the issue. For other devices try to disconnect the network or try rebooting them and see if they are getting new leases.

LordMike commented 3 years ago

Huh ... I was convinced all packets were related to my own desktop - but you're right .. it's ofc. broadcasts.. :|

Ok - so the issue isn't a network one .. it's windows being stuck with the previous DHCP server. My lease time is 7200 seconds, so I guess if I just wait, then all devices should be on the new DHCP server.. :O

I wonder why my iPhone decided there was no internet.

ShreyasZare commented 3 years ago

Huh ... I was convinced all packets were related to my own desktop - but you're right .. it's ofc. broadcasts.. :|

Ok - so the issue isn't a network one .. it's windows being stuck with the previous DHCP server. My lease time is 7200 seconds, so I guess if I just wait, then all devices should be on the new DHCP server.. :O

I wonder why my iPhone decided there was no internet.

Do try rebooting the devices, on reboot they should try to get new lease if old lease is not getting renewed.

LordMike commented 3 years ago

Cool. I'll give it a whirl. It probably works fine then.. :)

Thanks!

LordMike commented 3 years ago

Can confirm. Works fine after my old leases expired.