Encapsulated Type Options (Option Spaces)
Defining custom DHCP options enable network administrators to extend and tailor DHCP functionality beyond the standard configuration parameters. Custom DHCP options provide a way to convey specific information to DHCP clients during the lease negotiation process. Here's a general process for defining custom DHCP options:
In ManageEngine DDI, Custom Options are defined and values are provided within the respective fields provided within the GUI by specifying details like: the user-defined option name, code, and any data type restrictions as shown in the image below. These custom options can be defined at multiple levels. To define cluster level custom options, go to DHCP-> Config-> Custom Option.
[option-name] [option-space] [option-description] [option- data-type] [option-code] are the parameters that help define a custom DHCP option.
To create a Custom option in DDI:
Click on the green + (plus) button besides the Options dropdown box.
The Add Definition window appears. Here you can declare and define your new Custom option in DDI:

Note:
The option-name must be different from server-defined options and consist of alphanumeric characters and '-'.
The option-code is typically between 128 and 254.
Supported option-types include boolean, integer[(signed) integer8, 16, 32, unsigned integer 8, 16, 32], string, text and IPv4 or IPv6 address, array of IP addresses, record and encapsulation.
The ISC BIND declaration format is shown below along with an example definition of a boolean option named my-option with code 209.
Declaration: option my-option code 209 = boolean;
Once declared, this option can accept values based on the grammar defined.
Setting: option my-option true;
Options of data type integer include specification of signed or unsigned (or blank) and integer length of either 8, 16, or 32 bits.
Declaration: option bits-per-sec code 210 = unsigned integer 32;
Setting: option bits-per-sec 1544000;
A string type option consists of a hexadecimal-encoded colon-separated octet string.
Declaration: option mac-manufacturer code 211 = string;
Setting: option mac-manufacturer a4:80:1f;
Text type options specify values encoded as ASCII text strings.
Declaration: option your-help-contact code 212 = text;
Setting: option your-help-contact 'John Smith';
The IP-address data type enables specification of an IPv4 address or resolvable domain name.
Declaration: option our-file-server code 213 = ip-address;
Setting: option our-file-server 10.0.209.12;
option our-file-server fileserv1.ipamww.com;
The IP6- address data type enables specification of an IPv6 address
Declaration: option our-video-server code 214 = ip6-address;
Setting: option our-video-server fc01:273e:90a:2::b1 ;
option dhcp6.some-server code 1234 = array of ip6-address;
option dhcp6.some-server 3ffe:bbbb:aaaa:aaaa::1, 3ffe:bbbb:aaaa:aaaa::2;
Array options provide a way to specify multiple values for boolean integer or IP address data type values (all of the same type) by simply inserting 'array of' before the data type. Array elements are defined when setting the option values using comma-separated values.
Declaration: option my-ip-array code 198 = array of ip-address;
Setting: option my-ip-array 10.0.100.1 10.100.0.1;
Note:
Options can contain arrays of any of the supported data types except for the text and string types, which aren’t currently supported in arrays.
An option space groups multiple options, typically with a common purpose. This grouping of options can be 'encapsulated' within a single user-defined option code. Consider the example of creating a db option space to specify some database connection suboptions.
Declaration: option space db;
Setting value:
option db.db-server code 1 = ip-address;
option db.loginid code 2 = text;
option db.db-name code 3 = text;
option database-encapsulated code 221 = encapsulate db;
The first line option space db; defines the db option space. Next three suboptions are defined within this space. Each suboption has a unique code which is typically numbered from 1 since these are suboption code values. These suboptions are encapsulated within the parent option of code 221 named database-encapsulated. The setting statements below would set values to suboptions 1 2 and 3 encapsulated within option 221.
Setting: option db.db-server 10.199.200.37;
option db.loginid 'database';
option db.db-name 'mydatabase';
While array options provide specification of multiple elements of the same type, Record types options enable specification of multiple elements of different types. Each element of the record is specified in order in the UI. The following example defines an option of data type record including an integer (16 bit) text boolean and IP address as input values..
Note:
Unlike arrays, record element values accept only space separated not comma separated.
Definition: option my-rec code 198 = { integer 16 text boolean ip-address };
Values:option my-rec 4096 'cio' true 10.10.99.12;