<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-crea="font-wrapper" style="font-family: Tahoma; font-size: 13px; direction: ltr"><div style="font-family: Tahoma; font-size: 16px"></div><div><br></div><div>Thanks, I've sorted it out.</div><div><br></div><div>First of all you need an option-def entry in the config to make the option "available for use" if that makes sense:</div><div><br></div><div>"Dhcp4": {<br>    "option-def": [<br>        {<br>            "name": "AP-option",<br>            "code": 191,<br>            "type": "string",<br>            "space": "dhcp4",<br>            "array": false,<br>            "encapsulate": ""<br>        }<br>    ],.....</div><div><br></div><div>Then within the subnet section you use the option:</div><div><br></div><div>    "subnet4": [<br>        {<br>            "subnet": "192.168.*.*/24",<br>            "pools": [<br>                {<br>                    "pool": "192.168.*.* - 192.168.*.*"<br>                }<br>            ],<br>            "option-data": [<br>                {<br>                    "name": "AP-option",<br>                    "data": "pool1=192.168.x.y;level=1"<br>                },<br><br></div><div><br></div><br><div data-anchor="reply-title">On Wed, Nov 27, 2019 at 11:24, Brian Candler <b.candler@pobox.com> wrote:</div><blockquote><div><div style="color: #000000;background-color: #FFFFFF">

  
  
    <div>On 27/11/2019 10:09,
      <a href="mailto:chris@slater-walker.net" target="_blank" tabindex="-1" rel="external" style="cursor: inherit;">chris@slater-walker.net</a> wrote:<br></div>
    <blockquote type="cite" cite="mid:ce15cbb55fdf7b23db6ace946a03231b@rufus.slater-walker.net">
      <div>That's it; I need to give this to DHCP clients as a simple
        ascii text string but I can't find a piece of documentation
        which tells me how to do this. My attempts at configuring it
        always end up with an error.</div>
      <div><br></div>
    </blockquote>
    What kind of error - does KEA itself report an error?  If so,
      what does the error message actually say?<br>
    Or does KEA accept it, but your client device doesn't receive the
      attribute, or not in the format it expects?  In that case, what
      does tcpdump show?<br><br><br><br><blockquote type="cite" cite="mid:ce15cbb55fdf7b23db6ace946a03231b@rufus.slater-walker.net">
      <div>This is what I currently have:</div>
      <div><br></div>
      <div>"subnet4": [<br>
                {<br>
                    "subnet": "192.168.2.0/24",<br>
                             "option-data": [<br>
                        {<br>
                            "name": "AP-option",<br>
                            "code": 191,<br>
                            "data": "pool1=192.168.2.249;level=1"<br>
                        }</div>
      <div>            ],...</div>
      <div>        }<br></div>
      <div><br></div>
    </blockquote>
    <a href="https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options" target="_blank" tabindex="-1" rel="external" style="cursor: inherit;">https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options</a><br>
    Try:<br><pre style='box-sizing: border-box;font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;font-size: 12px;white-space: pre;margin: 0px;padding: 12px;display: block;overflow: auto;line-height: 1.4;color: rgb(64, 64, 64);font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial'><span style="box-sizing: border-box;color: rgb(186, 33, 33)">"Dhcp4"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box">{</span>
    <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"option-def"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box">[</span>
        <span style="box-sizing: border-box">{</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"name"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"AP-option"</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"code"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(102, 102, 102)">191</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"type"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"string"</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"array"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box">false</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"space"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"dhcp4"</span><span style="box-sizing: border-box">,</span>
        <span style="box-sizing: border-box">},</span> <span style="box-sizing: border-box;color: rgb(102, 102, 102)">...</span></pre>
    <br>Then under the subnet:<br><br><pre style='box-sizing: border-box;font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;font-size: 12px;white-space: pre;margin: 0px;padding: 12px;display: block;overflow: auto;line-height: 1.4;color: rgb(64, 64, 64);font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial'>    <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"option-data"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box">[</span>
        <span style="box-sizing: border-box">{</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"name"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"AP-option"</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"code"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(102, 102, 102)">191</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"space"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"dhcp4"</span><span style="box-sizing: border-box">,</span>
            <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"data"</span><span style="box-sizing: border-box">:</span> <span style="box-sizing: border-box;color: rgb(186, 33, 33)">"</span><span style="box-sizing: border-box;color: rgb(186, 33, 33)">pool1=192.168.2.249;level=1"</span>
        <span style="box-sizing: border-box">},</span> <span style="box-sizing: border-box;color: rgb(102, 102, 102)">...</span></pre>
    (Aside: I don't know why the code and space are duplicated in
      option-data, even though they've already been defined in
      option-def, but that's what the examples show)<br><br>
    HTH,<br>
    Brian.<br><br></div></div></blockquote></div></body></html>