Over ISC-DHCP server I wanted to define a custom DHCP Option, for which I am using below config

option imagefile code 224 = ip-address;

subnet netmask {
 option imagefile;

I am able to restart DHCP server after above configuration.

However on client I am not able to grab this option. I am expecting to have this information in /var/db/dhclient.leases.em0

I am having a freebsd client.

I also tried to define below config in dhclinet (onclient side )

#option imagefile code 224 = ip-address ;
interface "em0" {
  option imagefile code 224 = ip-address;
  request imagefile;

However my service did not get start correctly .i.e.

Starting dhclient.
/etc/dhclient.conf line 12: expecting a statement.
/etc/dhclient.conf line 13: semicolon expected.
DHCPREQUEST on em0 to port 67
bound to -- renewal in 17669 seconds.

Kindly help with correct dhclient configuration or if I need to change something on isc-dhcp server to automatically get this custom option on client without defining any config on client

  • In server, try option option-224 ""; (see dhcp-options) Mar 15, 2021 at 6:16
  • @VladimirBotka , I tried that on server however ISC-DHCP server did not restart complaining about syntax. for custom option definition on server I have followed this (kb.isc.org/docs/…) If i try same on dhcp client it also saying syntax errors. Mar 15, 2021 at 9:04
  • so in client if I try below in /etc/dhclient.conf request option-224; I get below value in lease file lease { interface "em0"; .... .... option dhcp-server-identifier; option option-224 "testing.com"; ..... .... } dhcp server config is like option url code 224 = string; subnet netmask { range; #option www-server; option url "testing.com"; } however yet its not getting on name. Mar 15, 2021 at 10:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.