2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 15:35:17 +00:00

[2657] Reformatting some of the DHCPv4 sections.

This commit is contained in:
Marcin Siodelski
2013-01-23 17:18:00 +01:00
parent 3d1ea31fe2
commit 2a9656fb9a

View File

@@ -3617,7 +3617,7 @@ Dhcp4/subnet4 [] list (default)
One of the major features of DHCPv4 server is to provide configuration One of the major features of DHCPv4 server is to provide configuration
options to clients. Although there are several options that require options to clients. Although there are several options that require
special behavior, most options are sent by the server only if the client special behavior, most options are sent by the server only if the client
explicitely requested them. The following example shows how to explicitly requested them. The following example shows how to
configure DNS servers, which is one of the most frequently used configure DNS servers, which is one of the most frequently used
options. Numbers in the first column are added for easier reference and options. Numbers in the first column are added for easier reference and
will not appear on screen. Options specified in this way are considered will not appear on screen. Options specified in this way are considered
@@ -3638,16 +3638,16 @@ Dhcp4/subnet4 [] list (default)
contains information on all global options that the server is contains information on all global options that the server is
supposed to configure in all subnets. The second line specifies supposed to configure in all subnets. The second line specifies
option name. For a complete list of currently supported names, option name. For a complete list of currently supported names,
see the list <xref linkend="dhcp4-std-options-list"/> below. see <xref linkend="dhcp4-std-options-list"/> below.
The third line specified option code. It must match values from The third line specifies option code, which must match one of the
the list. Fourth line specifies option space, which must always values from that list. Line 4 specifies option space, which must always
be set to "dhcp4" as these are standard DHCPv4 options. For be set to "dhcp4" as these are standard DHCPv4 options. For
other option spaces, including custom option spaces, see <xref other option spaces, including custom option spaces, see <xref
linkend="dhcp4-option-spaces"/>. Fifth line specifies format in linkend="dhcp4-option-spaces"/>. The fifth line specfies the format in
which data will be specified. It is recommended to use CSV (coma which the data will be entered: use of CSV (comma
separated values). The sixth list specifies the actual value to separated values) is recommended. The sixth line gives the actual value to
be sent to clients. Data is specified as a normal text with be sent to clients. Data is specified as a normal text, with
values separated with comas, if more than one value is values separated by commas if more than one value is
allowed. allowed.
</para> </para>
@@ -3668,22 +3668,24 @@ Dhcp4/subnet4 [] list (default)
&gt; <userinput>config commit</userinput> &gt; <userinput>config commit</userinput>
</screen> </screen>
(The value for the setting of the "data" element is split across two (The value for the setting of the "data" element is split across two
lines in this document for clarity: when entering the command, all the lines in this document for clarity: when entering the command, the
string should be entered on the same line.) string should be entered on the same line.)
</para> </para>
<para> <para>
As with global settings, it is also possible to override options It is possible to override options on a per-subnet basis. If
on a per-subnet basis. The following commands override the clients connected to most of your subnets are expected to get the
global DNS servers option for a particular subnet, setting a same values of a given option, you should use global options: you
single DNS server with address 192.0.2.3. It is convenient can then override specific values for a small number of subnets.
to use global options when clients connected to most of your On the other hand, if you use different values in each subnet,
subnets are expected to get the same values of a given it does not make sense to specify global option values
option. You can then override specific values for small number (Dhcp4/option-data), rather you should set only subnet-specific values
of subnets. If you use different values in each subnet, it does
not make sense to specify global option values
(Dhcp4/option-data), but rather use only subnet-specific values
(Dhcp4/subnet[X]/option-data[Y]). (Dhcp4/subnet[X]/option-data[Y]).
</para>
<para>
The following commands override the global
DNS servers option for a particular subnet, setting a single DNS
server with address 2001:db8:1::3.
<screen> <screen>
&gt; <userinput>config add Dhcp4/subnet4[0]/option-data</userinput> &gt; <userinput>config add Dhcp4/subnet4[0]/option-data</userinput>
&gt; <userinput>config set Dhcp4/subnet4[0]/option-data[0]/name "domain-name-servers"</userinput> &gt; <userinput>config set Dhcp4/subnet4[0]/option-data[0]/name "domain-name-servers"</userinput>
@@ -3701,106 +3703,114 @@ Dhcp4/subnet4 [] list (default)
</note> </note>
<para> <para>
This is the list of currently supported standard DHCPv4 options. Name and code Below is a list of currently supported standard DHCPv4 options. The name and code
specify name and code that should be used as a name in option-data specify name and code that should be used as a name in option-data
structures. Type designates the actual format of the data. Uint8 means 8 bit structures. Type designates the actual format of the data:
unsigned integer with allowed values 0 to 255. Uint16 means 16 bit unsinged
integer with allowed values 0 to 65535. Uint32 means 32 bit unsigned integer with
allowed values 0 to 4294967295. ipv4-address means a normal IPv4 address. Fqdn means
fully qualified domain name. String means any text. Some options are designated
as arrays. This means that more than one value is allowed in such an option. For example
the option domain-name-servers allows conveying more than one IPv4 addresses,
so clients will get multiple DNS servers if needed.
</para> </para>
<!-- @todo: describe record types --> <!-- @todo: describe record types -->
<para> <para>
<itemizedlist id="dhcp4-std-options-list"> <table border="1" cellpadding="5%" id="dhcp4-std-options-list">
<title>List of standard DHCPv4 options</title> <caption>List of standard DHCPv4 options</caption>
<listitem><para>name: subnet-mask, code: 1, csv-format: true, type: ipv4-address, array: false</para></listitem> <thead>
<listitem><para>name: time-offset, code: 2, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>Name</td><td>Code</td><td>Type</td><td>Array?</td></tr>
<listitem><para>name: routers, code: 3, csv-format: true, type: ipv4-address, array true</para></listitem> <tr></tr>
<listitem><para>name: time-servers, code: 4, csv-format: true, type: ipv4-address, array true</para></listitem> </thead>
<listitem><para>name: name-servers, code: 5, csv-format: true, type: ipv4-address, array: false</para></listitem> <tbody>
<listitem><para>name: domain-name-servers, code: 6, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>subnet-mask</td><td>1</td><td>true</td><td>ipv4-address</td><td>false</td></tr>
<listitem><para>name: log-servers, code: 7, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>time-offset</td><td>2</td><td>true</td><td>uint32</td><td>false</td></tr>
<listitem><para>name: cookie-servers, code: 8, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>routers</td><td>3</td><td>true</td><td>ipv4-address</td><td>true</td></tr>
<listitem><para>name: lpr-servers, code: 9, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>time-servers</td><td>4</td><td>true</td><td>ipv4-address</td><td>array true</td></tr>
<listitem><para>name: impress-servers, code: 10, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>name-servers</td><td>5</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: resource-location-servers, code: 11, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>domain-name-servers</td><td>6</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: host-name, code: 12, csv-format: true, type: string, array: false</para></listitem> <tr><td>log-servers</td><td>7</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: boot-size, code: 13, csv-format: true, type: uint16, array: false</para></listitem> <tr><td>cookie-servers</td><td>8</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: merit-dump, code: 14, csv-format: true, type: string, array: false</para></listitem> <tr><td>lpr-servers</td><td>9</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: domain-name, code: 15, csv-format: true, type: fqdn, array: false</para></listitem> <tr><td>impress-servers</td><td>10</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: swap-server, code: 16, csv-format: true, type: ipv4-address, array: false</para></listitem> <tr><td>resource-location-servers</td><td>11</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: root-path, code: 17, csv-format: true, type: string, array: false</para></listitem> <tr><td>host-name</td><td>12</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: extensions-path, code: 18, csv-format: true, type: string, array: false</para></listitem> <tr><td>boot-size</td><td>13</td><td>true</td><td>type: uint16</td><td>false</td></tr>
<listitem><para>name: ip-forwarding, code: 19, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>merit-dump</td><td>14</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: non-local-source-routing, code: 20, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>domain-name</td><td>15</td><td>true</td><td>type: fqdn</td><td>false</td></tr>
<listitem><para>name: policy-filter, code: 21, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>swap-server</td><td>16</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: max-dgram-reassembly, code: 22, csv-format: true, type: uint16, array: false</para></listitem> <tr><td>root-path</td><td>17</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: default-ip-ttl, code: 23, csv-format: true, type: uint8, array: false</para></listitem> <tr><td>extensions-path</td><td>18</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: path-mtu-aging-timeout, code: 24, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>ip-forwarding</td><td>19</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: path-mtu-plateau-table, code: 25, csv-format: true, type: uint16, array true</para></listitem> <tr><td>non-local-source-routing</td><td>20</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: interface-mtu, code: 26, csv-format: true, type: uint16, array: false</para></listitem> <tr><td>policy-filter</td><td>21</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: all-subnets-local, code: 27, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>max-dgram-reassembly</td><td>22</td><td>true</td><td>type: uint16</td><td>false</td></tr>
<listitem><para>name: broadcast-address, code: 28, csv-format: true, type: ipv4-address, array: false</para></listitem> <tr><td>default-ip-ttl</td><td>23</td><td>true</td><td>type: uint8</td><td>false</td></tr>
<listitem><para>name: perform-mask-discovery, code: 29, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>path-mtu-aging-timeout</td><td>24</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: mask-supplier, code: 30, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>path-mtu-plateau-table</td><td>25</td><td>true</td><td>type: uint16</td><td>array true</td></tr>
<listitem><para>name: router-discovery, code: 31, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>interface-mtu</td><td>26</td><td>true</td><td>type: uint16</td><td>false</td></tr>
<listitem><para>name: router-solicitation-address, code: 32, csv-format: true, type: ipv4-address, array: false</para></listitem> <tr><td>all-subnets-local</td><td>27</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: static-routes, code: 33, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>broadcast-address</td><td>28</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: trailer-encapsulation, code: 34, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>perform-mask-discovery</td><td>29</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: arp-cache-timeout, code: 35, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>mask-supplier</td><td>30</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: ieee802-3-encapsulation, code: 36, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>router-discovery</td><td>31</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: default-tcp-ttl, code: 37, csv-format: true, type: uint8, array: false</para></listitem> <tr><td>router-solicitation-address</td><td>32</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: tcp-keepalive-internal, code: 38, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>static-routes</td><td>33</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: tcp-keepalive-garbage, code: 39, csv-format: true, type: boolean, array: false</para></listitem> <tr><td>trailer-encapsulation</td><td>34</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: nis-domain, code: 40, csv-format: true, type: string, array: false</para></listitem> <tr><td>arp-cache-timeout</td><td>35</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: nis-servers, code: 41, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>ieee802-3-encapsulation</td><td>36</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: ntp-servers, code: 42, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>default-tcp-ttl</td><td>37</td><td>true</td><td>type: uint8</td><td>false</td></tr>
<listitem><para>name: vendor-encapsulated-options, code: 43, csv-format: true, type: empty, array: false</para></listitem> <tr><td>tcp-keepalive-internal</td><td>38</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: netbios-name-servers, code: 44, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>tcp-keepalive-garbage</td><td>39</td><td>true</td><td>type: boolean</td><td>false</td></tr>
<listitem><para>name: netbios-dd-server, code: 45, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>nis-domain</td><td>40</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: netbios-node-type, code: 46, csv-format: true, type: uint8, array: false</para></listitem> <tr><td>nis-servers</td><td>41</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: netbios-scope, code: 47, csv-format: true, type: string, array: false</para></listitem> <tr><td>ntp-servers</td><td>42</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: font-servers, code: 48, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>vendor-encapsulated-options</td><td>43</td><td>true</td><td>type: empty</td><td>false</td></tr>
<listitem><para>name: x-display-manager, code: 49, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>netbios-name-servers</td><td>44</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: dhcp-requested-address, code: 50, csv-format: true, type: ipv4-address, array: false</para></listitem> <tr><td>netbios-dd-server</td><td>45</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: dhcp-lease-time, code: 51, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>netbios-node-type</td><td>46</td><td>true</td><td>type: uint8</td><td>false</td></tr>
<listitem><para>name: dhcp-option-overload, code: 52, csv-format: true, type: uint8, array: false</para></listitem> <tr><td>netbios-scope</td><td>47</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: dhcp-message-type, code: 53, csv-format: true, type: uint8, array: false</para></listitem> <tr><td>font-servers</td><td>48</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: dhcp-server-identifier, code: 54, csv-format: true, type: ipv4-address, array: false</para></listitem> <tr><td>x-display-manager</td><td>49</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<listitem><para>name: dhcp-parameter-request-list, code: 55, csv-format: true, type: uint8, array true</para></listitem> <tr><td>dhcp-requested-address</td><td>50</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: dhcp-message, code: 56, csv-format: true, type: string, array: false</para></listitem> <!-- Lease time should not be configured by a user.
<listitem><para>name: dhcp-max-message-size, code: 57, csv-format: true, type: uint16, array: false</para></listitem> <tr><td>dhcp-lease-time</td><td>51</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: dhcp-renewal-time, code: 58, csv-format: true, type: uint32, array: false</para></listitem> -->
<listitem><para>name: dhcp-rebinding-time, code: 59, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>dhcp-option-overload</td><td>52</td><td>true</td><td>type: uint8</td><td>false</td></tr>
<listitem><para>name: vendor-class-identifier, code: 60, csv-format: true, type: binary, array: false</para></listitem> <!-- Message Type, Server Identifier and Parameter Request List should not be configured by a user.
<listitem><para>name: dhcp-client-identifier, code: 61, csv-format: true, type: binary, array: false</para></listitem> <tr><td>dhcp-message-type</td><td>53</td><td>true</td><td>type: uint8</td><td>false</td></tr>
<listitem><para>name: nwip-domain-name, code: 62, csv-format: true, type: string, array: false</para></listitem> <tr><td>dhcp-server-identifier</td><td>54</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<listitem><para>name: nwip-suboptions, code: 63, csv-format: true, type: binary, array: false</para></listitem> <tr><td>dhcp-parameter-request-list</td><td>55</td><td>true</td><td>type: uint8</td><td>array true</td></tr>
<listitem><para>name: user-class, code: 77, csv-format: true, type: binary, array: false</para></listitem> -->
<listitem><para>name: fqdn, code: 81, csv-format: true, type: record, array: false</para></listitem> <tr><td>dhcp-message</td><td>56</td><td>true</td><td>type: string</td><td>false</td></tr>
<listitem><para>name: dhcp-agent-options, code: 82, csv-format: true, type: empty, array: false</para></listitem> <tr><td>dhcp-max-message-size</td><td>57</td><td>true</td><td>type: uint16</td><td>false</td></tr>
<listitem><para>name: authenticate, code: 90, csv-format: true, type: binary, array: false</para></listitem> <!-- Renewal and rebinding time should not be configured by a user.
<listitem><para>name: client-last-transaction-time, code: 91, csv-format: true, type: uint32, array: false</para></listitem> <tr><td>dhcp-renewal-time</td><td>58</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: associated-ip, code: 92, csv-format: true, type: ipv4-address, array true</para></listitem> <tr><td>dhcp-rebinding-time</td><td>59</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<listitem><para>name: subnet-selection, code: 118, csv-format: true, type: ipv4-address, array: false</para></listitem> -->
<listitem><para>name: domain-search, code: 119, csv-format: true, type: binary, array: false</para></listitem> <tr><td>vendor-class-identifier</td><td>60</td><td>true</td><td>type: binary</td><td>false</td></tr>
<listitem><para>name: vivco-suboptions, code: 124, csv-format: true, type: binary, array: false</para></listitem> <!-- Client identifier should not be configured by a user.
<listitem><para>name: vivso-suboptions, code: 125, csv-format: true, type: binary, array: false</para></listitem> <tr><td>dhcp-client-identifier</td><td>61</td><td>true</td><td>type: binary</td><td>false</td></tr>
</itemizedlist></para> -->
</section> <tr><td>nwip-domain-name</td><td>62</td><td>true</td><td>type: string</td><td>false</td></tr>
<tr><td>nwip-suboptions</td><td>63</td><td>true</td><td>type: binary</td><td>false</td></tr>
<tr><td>user-class</td><td>77</td><td>true</td><td>type: binary</td><td>false</td></tr>
<tr><td>fqdn</td><td>81</td><td>true</td><td>type: record</td><td>false</td></tr>
<tr><td>dhcp-agent-options</td><td>82</td><td>true</td><td>type: empty</td><td>false</td></tr>
<tr><td>authenticate</td><td>90</td><td>true</td><td>type: binary</td><td>false</td></tr>
<tr><td>client-last-transaction-time</td><td>91</td><td>true</td><td>type: uint32</td><td>false</td></tr>
<tr><td>associated-ip</td><td>92</td><td>true</td><td>type: ipv4-address</td><td>array true</td></tr>
<tr><td>subnet-selection</td><td>118</td><td>true</td><td>type: ipv4-address</td><td>false</td></tr>
<tr><td>domain-search</td><td>119</td><td>true</td><td>type: binary</td><td>false</td></tr>
<tr><td>vivco-suboptions</td><td>124</td><td>true</td><td>type: binary</td><td>false</td></tr>
<tr><td>vivso-suboptions</td><td>125</td><td>true</td><td>type: binary</td><td>false</td></tr>
</tbody>
</table>
</para>
</section>
<section id="dhcp4-custom-options"> <section id="dhcp4-custom-options">
<title>Custom DHCPv4 options</title> <title>Custom DHCPv4 options</title>
<para>It is also possible to define new options that are <para>It is also possible to define new options that are
currently not supported out of the box. Let's assume that we currently not supported out of the box. Let's assume that we
want to define a new DHCPv4 option called foo. It will have code 222 want to define a new DHCPv4 option called "foo". It will have code 222
and will convey a single unsigned 32 bit integer value. We can define and will convey a single unsigned 32 bit integer value. We can define
such option format by using the following commands: such an option by using the following commands:
<screen> <screen>
&gt; <userinput>config add Dhcp4/option-def</userinput> &gt; <userinput>config add Dhcp4/option-def</userinput>
&gt; <userinput>config set Dhcp4/option-def[0]/name "foo"</userinput> &gt; <userinput>config set Dhcp4/option-def[0]/name "foo"</userinput>
@@ -3814,22 +3824,24 @@ Dhcp4/subnet4 [] list (default)
Note that this specifies new option format, not the values conveyed in Note that this specifies new option format, not the values conveyed in
that option. that option.
</para> </para>
<para>Once the new option format is specified, concrete values can then <para>Once the new option format is defined, concrete values can then
be specified in the same way as standard options. For example the following be specified in the same way as standard options. For example the following
commands may be used to define global values that apply to all subnets. commands may be used to define global values that apply to all subnets.
<screen> <screen>
1. &gt; <userinput>config add Dhcp4/option-data</userinput> &gt; <userinput>config add Dhcp4/option-data</userinput>
2. &gt; <userinput>config set Dhcp4/option-data[0]/name "foo"</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/name "foo"</userinput>
3. &gt; <userinput>config set Dhcp4/option-data[0]/code 222</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/code 222</userinput>
4. &gt; <userinput>config set Dhcp4/option-data[0]/space "dhcp4"</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/space "dhcp4"</userinput>
5. &gt; <userinput>config set Dhcp4/option-data[0]/csv-format true</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/csv-format true</userinput>
6. &gt; <userinput>config set Dhcp4/option-data[0]/data "12345"</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/data "12345"</userinput>
7. &gt; <userinput>config commit</userinput></screen> &gt; <userinput>config commit</userinput></screen>
</para> </para>
<para>New options can take more complex forms than simple use of <para>New options can take more complex forms than simple use of
primitives (uint8, string, ipv4-address etc). It is possible to primitives (uint8, string, ipv4-address etc). It is possible to
define composition of existing primitives. Let's assume that we define an option comprising a number of existing primitives.
</para>
<para>Assume we
want to define a new option that will consist of an IPv4 want to define a new option that will consist of an IPv4
address, followed by unsigned 16 bit integer, followed by a text address, followed by unsigned 16 bit integer, followed by a text
string. Such an option could be defined in the following way: string. Such an option could be defined in the following way:
@@ -3851,19 +3863,19 @@ Dhcp4/subnet4 [] list (default)
&gt; <userinput>config set Dhcp4/option-data[0]/code 223</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/code 223</userinput>
&gt; <userinput>config set Dhcp4/option-data[0]/csv-format true</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/csv-format true</userinput>
&gt; <userinput>config set Dhcp4/option-data[0]/data "192.0.2.100, 123, Hello World"</userinput> &gt; <userinput>config set Dhcp4/option-data[0]/data "192.0.2.100, 123, Hello World"</userinput>
7. &gt; <userinput>config commit</userinput></screen> &gt; <userinput>config commit</userinput></screen>
</para> </para>
</section> </section>
<section id="dhcp4-vendor-opts"> <section id="dhcp4-vendor-opts">
<title>DHCPv4 vendor specific options</title> <title>DHCPv4 vendor specific options</title>
<para>Currently there are two option spaces defined: dhcp4 (to <para>Currently there are three option spaces defined: dhcp4 (to
be used in DHCPv4 daemon) and dhcp4. There is also vendor-opts-space, be used in DHCPv4 daemon) and dhcp4; there is also vendor-opts-space,
which is empty by default, but options can be defined in it. Those options which is empty by default, but options can be defined in it. Those options
are called vendor-specific information options. The following examples are called vendor-specific information options. The following examples
show how to define an option foo with code 1 that consists of IPv4 address, show how to define an option "foo" with code 1 that consists of IPv4 address,
unsigned 16 bit integer and a string. The foo option is conveyed in unsigned 16 bit integer and a string. The "foo" option is conveyed in a
vendor specific information option. vendor specific information option.
<screen> <screen>
&gt; <userinput>config add Dhcp4/option-def</userinput> &gt; <userinput>config add Dhcp4/option-def</userinput>
@@ -3909,63 +3921,66 @@ Dhcp4/subnet4 [] list (default)
codes 1 and 2. This could be achieved with the following examples. codes 1 and 2. This could be achieved with the following examples.
First we need to define those new sub-options: First we need to define those new sub-options:
<screen> <screen>
config add Dhcp4/option-def &gt; <userinput>config add Dhcp4/option-def</userinput>
config set Dhcp4/option-def[0]/name "subopt1" &gt; <userinput>config set Dhcp4/option-def[0]/name "subopt1"</userinput>
config set Dhcp4/option-def[0]/code 1 &gt; <userinput>config set Dhcp4/option-def[0]/code 1</userinput>
config set Dhcp4/option-def[0]/space "isc" &gt; <userinput>config set Dhcp4/option-def[0]/space "isc"</userinput>
config set Dhcp4/option-def[0]/type "ipv4-address" &gt; <userinput>config set Dhcp4/option-def[0]/type "ipv4-address"</userinput>
config set Dhcp4/option-def[0]/record-types "" &gt; <userinput>config set Dhcp4/option-def[0]/record-types ""</userinput>
config set Dhcp4/option-def[0]/array false &gt; <userinput>config set Dhcp4/option-def[0]/array false</userinput>
config set Dhcp4/option-def[0]/encapsulate "" &gt; <userinput>config set Dhcp4/option-def[0]/encapsulate ""</userinput>
config commit &gt; <userinput>config commit</userinput>
config add Dhcp4/option-def &gt; <userinput>config add Dhcp4/option-def</userinput>
config set Dhcp4/option-def[1]/name "subopt2" &gt; <userinput>config set Dhcp4/option-def[1]/name "subopt2"</userinput>
config set Dhcp4/option-def[1]/code 2 &gt; <userinput>config set Dhcp4/option-def[1]/code 2</userinput>
config set Dhcp4/option-def[1]/space "isc" &gt; <userinput>config set Dhcp4/option-def[1]/space "isc"</userinput>
config set Dhcp4/option-def[1]/type "string" &gt; <userinput>config set Dhcp4/option-def[1]/type "string"</userinput>
config set Dhcp4/option-def[1]/record-types "" &gt; <userinput>config set Dhcp4/option-def[1]/record-types ""</userinput>
config set Dhcp4/option-def[1]/array false &gt; <userinput>config set Dhcp4/option-def[1]/array false</userinput>
config set Dhcp4/option-def[1]/encapsulate "" &gt; <userinput>config set Dhcp4/option-def[1]/encapsulate ""</userinput>
config commit</screen> &gt; <userinput>config commit</userinput>
</screen>
The next step is to define a regular DHCPv6 option and specify that it The next step is to define a regular DHCPv6 option and specify that it
should include options from isc option space: should include options from isc option space:
<screen> <screen>
config add Dhcp4/option-def &gt; <userinput>add Dhcp4/option-def</userinput>
config set Dhcp4/option-def[2]/name "container" &gt; <userinput>set Dhcp4/option-def[2]/name "container"</userinput>
config set Dhcp4/option-def[2]/code 222 &gt; <userinput>set Dhcp4/option-def[2]/code 222</userinput>
config set Dhcp4/option-def[2]/space "dhcp4" &gt; <userinput>set Dhcp4/option-def[2]/space "dhcp4"</userinput>
config set Dhcp4/option-def[2]/type "uint16" &gt; <userinput>set Dhcp4/option-def[2]/type "uint16"</userinput>
config set Dhcp4/option-def[2]/array false &gt; <userinput>set Dhcp4/option-def[2]/array false</userinput>
config set Dhcp4/option-def[2]/record-types "" &gt; <userinput>set Dhcp4/option-def[2]/record-types ""</userinput>
config set Dhcp4/option-def[2]/encapsulate "isc" &gt; <userinput>set Dhcp4/option-def[2]/encapsulate "isc"</userinput>
config commit</screen> &gt; <userinput>commit</userinput>
</screen>
Finally, we should specify values for those new options: Finally, we should specify values for those new options:
<screen> <screen>
config add Dhcp4/option-data &gt; <userinput>config add Dhcp4/option-data</userinput>
config set Dhcp4/option-data[0]/name "subopt1" &gt; <userinput>config set Dhcp4/option-data[0]/name "subopt1"</userinput>
config set Dhcp4/option-data[0]/space "isc" &gt; <userinput>config set Dhcp4/option-data[0]/space "isc"</userinput>
config set Dhcp4/option-data[0]/code 1 &gt; <userinput>config set Dhcp4/option-data[0]/code 1</userinput>
config set Dhcp4/option-data[0]/csv-format true &gt; <userinput>config set Dhcp4/option-data[0]/csv-format true</userinput>
config set Dhcp4/option-data[0]/data "192.0.2.3" &gt; <userinput>config set Dhcp4/option-data[0]/data "192.0.2.3"</userinput>
config commit &gt; <userinput>config commit</userinput>
<userinput></userinput>
config add Dhcp4/option-data &gt; <userinput>config add Dhcp4/option-data</userinput>
config set Dhcp4/option-data[1]/name "subopt2" &gt; <userinput>config set Dhcp4/option-data[1]/name "subopt2"</userinput>
config set Dhcp4/option-data[1]/space "isc" &gt; <userinput>config set Dhcp4/option-data[1]/space "isc"</userinput>
config set Dhcp4/option-data[1]/code 2 &gt; <userinput>config set Dhcp4/option-data[1]/code 2</userinput>
config set Dhcp4/option-data[1]/csv-format true &gt; <userinput>config set Dhcp4/option-data[1]/csv-format true</userinput>
config set Dhcp4/option-data[1]/data "Hello world" &gt; <userinput>config set Dhcp4/option-data[1]/data "Hello world"</userinput>
config commit &gt; <userinput>config commit</userinput>
<userinput></userinput>
config add Dhcp4/option-data &gt; <userinput>config add Dhcp4/option-data</userinput>
config set Dhcp4/option-data[2]/name "container" &gt; <userinput>config set Dhcp4/option-data[2]/name "container"</userinput>
config set Dhcp4/option-data[2]/space "dhcp4" &gt; <userinput>config set Dhcp4/option-data[2]/space "dhcp4"</userinput>
config set Dhcp4/option-data[2]/code 222 &gt; <userinput>config set Dhcp4/option-data[2]/code 222</userinput>
config set Dhcp4/option-data[2]/csv-format true &gt; <userinput>config set Dhcp4/option-data[2]/csv-format true</userinput>
config set Dhcp4/option-data[2]/data "123" &gt; <userinput>config set Dhcp4/option-data[2]/data "123"</userinput>
config commit</screen> &gt; <userinput>config commit</userinput>
</screen>
</para> </para>
</section> </section>
@@ -4347,7 +4362,7 @@ Dhcp6/subnet6/ list
<para> <para>
It is possible to override options on a per-subnet basis. If It is possible to override options on a per-subnet basis. If
clients connected to most of your subnets are expected to get the clients connected to most of your subnets are expected to get the
same values of a given option, youu should use global options: you same values of a given option, you should use global options: you
can then override specific values for a small number of subnets. can then override specific values for a small number of subnets.
On the other hand, if you use different values in each subnet, On the other hand, if you use different values in each subnet,
it does not make sense to specify global option values it does not make sense to specify global option values
@@ -4493,7 +4508,7 @@ Dhcp6/subnet6/ list
<para>New options can take more complex forms than simple use of <para>New options can take more complex forms than simple use of
primitives (uint8, string, ipv6-address etc). It is possible to primitives (uint8, string, ipv6-address etc). It is possible to
define an option comprising a a number of existing primitives. define an option comprising a number of existing primitives.
</para> </para>
<para> <para>
Assume we Assume we