<div dir="ltr"><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div>Hi!</div><div>I want to convert isc-dhcp-server config below to Kea.</div><div>```</div><div>option space test_opt code width 2 length width 2 hash size 17;</div><div>option test_opt.script-url code 36 = text;</div><br><div>subnet 10.138.127.128 netmask 255.255.255.128 {</div><div>  option routers 10.138.127.129;</div><div>  option subnet-mask 255.255.255.128;</div><div>  range dynamic-bootp 10.138.127.220 10.138.127.254;</div><div>  vendor-option-space test_opt;</div><div>  option test_opt.script-url = "<a href="http://10.138.124.42/ztp_arcos.py">http://10.138.124.42/ztp_arcos.py</a>";</div><div>}</div><div>```

</div><br><br><div>I set up Kea like below.(extract)</div><div>```</div><div>"Dhcp4": {</div><div>    "option-def": [</div><div>        {</div><div>            "name": "test_opt_script-url",</div><div>            "code": 36,</div><div>            "space": "vendor-encapsulated-options-space",</div><div>            "type": "string"</div><div>        }</div><div>    ],</div><br><div>    "subnet4": [</div><br><div>        {</div><div>            "subnet": "<a href="http://10.138.127.128/25">10.138.127.128/25</a>",</div><div>            "pools": [ { "pool": "10.138.127.220 - 10.138.127.254" } ],</div><div>            "option-data": [</div><div>                {</div><div>                    "name": "routers",</div><div>                    "data": "10.138.127.129"</div><div>                },</div><div>                {</div><div>                    "name": "test_opt_script-url",</div><div>                    "space": "vendor-encapsulated-options-space",</div><div>                    "data": "<a href="http://10.138.124.42/ztp_arcos.py">http://10.138.124.42/ztp_arcos.py</a>"</div><div>                },</div><div>                {</div><div>                    "name": "vendor-encapsulated-options"</div><div>                }</div><div>            ]</div><div>        }</div><div>    ]</div><div>```</div><br><div>Kea's DHCP reply is below. It include option 43 field.</div><br><div>```</div><div>14:39:03.677003 IP (tos 0x0, ttl 64, id 16054, offset 0, flags [DF], proto UDP (17), length 409)</div><div>    dhcpserver.bootps > 10.138.127.131.bootps: [bad udp cksum 0x1258 -> 0x5de2!] BOOTP/DHCP, Reply, length 381, hops 1, xid 0xd991b36f, Flags [none] (0x0000)</div><div>          Your-IP 10.138.127.249</div><div>          Gateway-IP 10.138.127.131</div><div>          Client-Ethernet-Address b4:a9:fc:d7:7f:44 (oui Unknown)</div><div>          Vendor-rfc1048 Extensions</div><div>            Magic Cookie 0x63825363</div><div>            DHCP-Message Option 53, length 1: Offer</div><div>            Subnet-Mask Option 1, length 4: 255.255.255.128</div><div>            Default-Gateway Option 3, length 4: 10.138.127.129</div><div>            Domain-Name-Server Option 6, length 8: 10.138.124.36,10.138.124.37</div><div>            Hostname Option 12, length 9: "localhost"</div><div>            Domain-Name Option 15, length 14: "local"</div><div>            Vendor-Option Option 43, length 35: 36.33.104.116.116.112.58.47.47.49.48.46.49.51.56.46.49.50.52.46.52.50.47.122.116.112.95.97.114.99.111.115.46.112.121</div><div>            Lease-Time Option 51, length 4: 3600</div><div>            Server-ID Option 54, length 4: dhcpserver</div><div>            RN Option 58, length 4: 900</div><div>            RB Option 59, length 4: 1800</div><div>            Client-ID Option 61, length 7: ether b4:a9:fc:d7:7f:44</div><div>            T119 Option 119, length 16: 57370161,41185796,1768516201,40529920</div><div>            END Option 255, length 0</div><div>```</div><br><div>It looks `36(code).33(Length).(data)` but DHCP client expects `00.36(code).00.33(length).(data)`</div><br><div>```</div><div>Vendor-Option Option 43, length 35: 36.33.104.116.116.112.58.47.47.49.48.46.49.51.56.46.49.50.52.46.52.50.47.122.116.112.95.97.114.99.111.115.46.112.121</div><div>```</div><br><div>How to reply `00.36(code).00.33(length).(data)` format?</div><br><br><div>Regards.</div><br><div>--</div><div>kakkotetsu (<a href="mailto:kakkotetsu@gmail.com">kakkotetsu@gmail.com</a>)</div></div></div>