Closed jy2e closed 2 years ago
Thanks for the feedback. Please check the logs for errors and post them here to know what went wrong. Also post details of the DHCP scope like the range that you have configured.
Using the default interface with scope:
10.1.1.0 netmask 255.255.255.0 excluding 10.1.1.1-10.1.1.99
2021-12-16 00:34:55 UTC] [10.1.1.20:67] DHCP Server failed to activate scope: [masked]
System.Net.Sockets.SocketException (10049): The requested address is not valid in its context.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at DnsServerCore.Dhcp.DhcpServer.<>c__DisplayClass26_0.2.GetOrAdd(TKey key, Func
2 valueFactory)
at DnsServerCore.Dhcp.DhcpServer.BindUdpListener(IPEndPoint dhcpEP) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dhcp\DhcpServer.cs:line 862
at DnsServerCore.Dhcp.DhcpServer.ActivateScopeAsync(Scope scope, Boolean waitForInterface) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dhcp\DhcpServer.cs:line 970
[2021-12-16 00:34:55 UTC] DHCP Server successfully loaded scope: [masked]
If I wait until after Windows is done with startup and enable the scope and restart it, it works fine.
Is it having a problem with multiple physical network interfaces?
Thanks for the details. The SocketException
message tells that the IP address that is to be bind to is not available on any local interface probably since Windows is still loading and the network stack may not be fully running yet when the DHCP server tries to bind socket.
A fix for this is to set the Technitium DNS Server
service startup type to Automatic (Delayed Start)
. This will ensure that the service starts once the network is available.
Fixed perfectly
I am running ver 7.1 on Windows. After reboot, the DHCP scope is disabled just like as described in #227, but the server is indeed listening and DNS is operating normally.