Host that runs the server is not served by the DHCP server #817
-
Hi! I have recently set up the DNS server for a network connected to this Debian system (system A), along with the DHCP server functionality. The network does not have any other DHCP server. For this network interface of the system I did not set up a regular static IP in Then I have created a scope for this network, and have set up system A's dhclient DHCP client to use a fallback IP address on this network interface for use until it receives a response from the DHCP server, at which point it will be filled in on the details, like the network domain (option 15), NTP and DNS servers and such. An other system (system B) on this network is served fine by the DHCP server, I see its lease on the web interface, and the dhclient logs in the system journal also show that 3/3 times it was served immediately, within the second. But it seems that for system A something is wrong. It sends a DHCPREQUEST multiple times a minute, but it never receives a response:
dhclient here is set up to request 10.100.1.1 from the server (which runs on this same host), which serves the network of the ens19 interface. Here is its corresponding configuration:
dhclient also has an other lease block for an other network that is served by an other DHCP server, and that one works fine. Technitium-DNS did not log anything related to DHCP in the meantime, other than updating records for system B, and saving the scope file. The scope has been enabled, while the default one disabled: Ping checks are not enabled, the requested address is not excluded from the scope, I have even made a reservation for it by MAC address, but it did not help. What could be the problem here? My goal is to have a centralized configuration for the network services (NTP, DNS, network domain) to be used by hosts on this network, which would set up the DHCP server's system too. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for the details. The DHCP server itself cannot be a DHCP client. The server must have a static IP address for the DHCP server to work. So, the setup you are trying to do wont work. You have to configure all these network options manually on the server. |
Beta Was this translation helpful? Give feedback.
Its not unfortunate, its a requirement to run DHCP server. Imagine that you reboot the server and now it needs to renew lease but it itself is DHCP server and unable to listen since it does not have lease to the IP address. Also, the broadcast packets that are sent are not read by the same host as you observed.
So, you should just configure static IP address manually on the server. You also need to either configure the scope to exclude the IP ranges to avoid them being leased or specify a different start address for the scope.
Note that the DHCP server will not start if it detects that the IP address was assigned by DHCP. So configuring "static" lease will have issue with that.