Page 1 of 1

dhcpd.conf with manual-dhcp

Posted: 11 Dec 2018 01:52
by Julien_g
Hello,

I am attempting to run the DHCP server with MAC address reservations. I have read through the topic in the networking guide, and have got it working with a dhcpd.conf file as below:

Code: Select all

#Global parameters that specify addresses and lease time.
option subnet-mask 255.255.0.0;
option routers 10.10.0.1;
option ntp-servers 10.10.1.10;
option dhcp-lease-time 86400;
#IP subnet
subnet 10.10.0.0 netmask 255.255.0.0
{
	#Dynamic scope and parameters that apply to this scope overriding global params.
	dynamic-dhcp range 10.10.0.100 10.10.0.200
	{
		option dhcp-lease-time 30000;
	}
	#Static binding based on MAC address
	manual-dhcp 00-18-1c-01-e7-b1 10.10.10.99
	{
		option subnet-mask 255.255.0.0;
		option routers 10.10.0.1;
	}
	manual-dhcp 00-18-1c-03-1a-97 10.10.11.22
	{
		option subnet-mask 255.255.0.0;
		option routers 10.10.0.1;
	}
}
As you can see, the router and subnet mask lines are duplicated for every reservation. The manual-dhcp entries do not seem to draw these from the global parameters. Does anyone know if there is a way to accomplish this, so the dhcpd.conf file would look more like this:

Code: Select all

#Global parameters that specify addresses and lease time.
option subnet-mask 255.255.0.0;
option routers 10.10.0.1;
option ntp-servers 10.10.1.10;
option dhcp-lease-time 86400;
#IP subnet
subnet 10.10.0.0 netmask 255.255.0.0
{
	#Dynamic scope and parameters that apply to this scope overriding global params.
	dynamic-dhcp range 10.10.0.100 10.10.0.200
	{
		option dhcp-lease-time 30000;
	}
	#Static binding based on MAC address
	manual-dhcp 00-18-1c-01-e7-b1 10.10.10.99
	manual-dhcp 00-18-1c-03-1a-97 10.10.11.22
}
Many thanks
Julien

Re: dhcpd.conf with manual-dhcp

Posted: 05 Jul 2023 07:37
by HStr
Hi Julien,

Did you already get an answer to your question? I have exactly the same problem and looking for a solution.

Regards
Holger

Re: dhcpd.conf with manual-dhcp

Posted: 06 Jun 2024 08:17
by manuld
Hi Julie,

As I read your config you have defined the mask and the gateway as global settings, which is not a good idea! Domain name, DNS, lease time, NTP can be global settings but subnet masks and Gateways are usually not global settings.

As a suggestion try adding the subnet mask and the gateway under the "subnet 10.10.0.0 netmask 255.255.0.0".
Inside that scope, you can add the "manual-dhcp 00-18-1c-01-e7-b1 10.10.10.99 {}"

This should work.

Regards,
Manul

Re: dhcpd.conf with manual-dhcp

Posted: 20 Feb 2025 07:59
by Cesmc93
Buen día, está configuración se puede aplicar para la versión de OS6900 8.9 r4?? Ya he intentado con las dos opciones y no me acepta la reserva por Mac, help please!!