<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p><br>
</p>
<p>the client requests option 43:</p>
<p>type=055, len=013: 1(uint8) 66(uint8) 6(uint8) 15(uint8)
44(uint8) 3(uint8) 67(uint8) 12(uint8) 33(uint8) 150(uint8)
43(uint8) 125(uint8) 125(uint8)<br>
</p>
<p><br>
</p>
<p>but the server to option 43 in the answer:</p>
<p>DEBUG DHCP4_RESPONSE_DATA [hwtype=1 00:b8:b3:6b:69:c0],
cid=[00:63:69:73:63:6f:2d:30:30:62:38:2e:62:33:36:62:2e:36:39:63:30:2d:56:6c:31],
tid=0x1e4a: responding with packet DHCPACK (type 5), packet
details: local_address=192.168.100.10:67,
remote_address=255.255.255.255:68, msg_type=DHCPACK (5),
transid=0x1e4a,<br>
options:<br>
type=001, len=004: 4294967040 (uint32)<br>
type=006, len=008: 192.0.2.1 192.0.2.2<br>
type=012, len=009: "staging01" (string)<br>
type=015, len=011: "example.org" (string)<br>
type=051, len=004: 3600 (uint32)<br>
type=053, len=001: 5 (uint8)<br>
type=054, len=004: 192.168.100.10<br>
type=058, len=004: 900 (uint32)<br>
type=059, len=004: 1800 (uint32)<br>
type=061, len=025:
00:63:69:73:63:6f:2d:30:30:62:38:2e:62:33:36:62:2e:36:39:63:30:2d:56:6c:31</p>
<p><br>
</p>
<p>Config in debug:</p>
<p><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">DEBUG
DHCP4_CONFIG_START DHCPv4 server is processing the following
configuration:</span></span></p>
<p><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">{<br>
(...)<br>
</span>"option-data": [<br>
{ "data": "192.0.2.1, 192.0.2.2", "name":
"domain-name-servers" },<br>
{ "code": 5, "data": "5A1D;K4;B2;I192.168.100.10", "name":
"openpnp", "space": "vendor-encapsulated-options-space" },<br>
{ "code": 15, "data": "example.org" }, { "data":
"mydomain.example.com, example.com", "name": "domain-search" },<br>
{ "data": "0xf0", "name": "default-ip-ttl" }<br>
],<br>
"option-def":<br>
[<br>
(...)<br>
{ "array": false, "code": 5, "encapsulate": "", "name":
"openpnp", "record-types": "", "space":
"vendor-encapsulated-options-space", "type": "string" }<br>
],<br>
"subnet4":<br>
[<br>
{ "option-data":<br>
[<br>
{ "always-send": true, "code": 5, "data":
"A1D;K4;B2;I192.168.100.10", "name": "openpnp", "space":
"vendor-encapsulated-options-sp<br>
ace" }<br>
],<br>
"pools": [ { "pool": "192.168.100.64 - 192.168.100.127" }
],<br>
"reservations": [ { "hostname": "staging01", "hw-address":
"00:b8:b3:6<br>
b:69:c0", "ip-address": "192.168.100.24", "option-data": [ {
"always-send": true, "code": 5, "data":
"A1D;K4;B2;I192.168.100.10", "name": "op<br>
enpnp", "space": "vendor-encapsulated-options-space" }<br>
]<br>
}<br>
],<br>
"subnet": "192.168.100.0/24"<br>
}<br>
], "valid-lifetime": 3600 }<br>
</span></p>
<p><br>
</p>
<div class="moz-cite-prefix">On 05.02.23 16:02, Darren Ankney wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKabWHj_Wpr_nfHaJhRrMpQM+U2rc2CKi=+aO8jq1MumhFRPEA@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">Hi Michael,
You might need to add:
"always-send": true
to
{
"name": "openpnp",
"space": "vendor-encapsulated-options-space",
"code": 5,
"data": "5A1D;K4;B2;I192.168.100.10",
"always-send": true
}
You can check by looking at the DISCOVER and REQUEST packets in your
DEBUG packet log. They should have option 55 (parameter request list)
as shown here:
type=055, len=004: 1(uint8) 3(uint8) 6(uint8) 28(uint8)
See if this list includes 43. If it does not, then always-send will
need to be set to true as the client is not requesting 43.
The other thing to check is if the client is actually receiving the
reserved IP address of 192.168.100.24 which I assume you already
checked that.
Otherwise, the below looks correct to me (very closely matches the
example shown on
<a class="moz-txt-link-freetext" href="https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#dhcpv4-vendor-specific-options">https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#dhcpv4-vendor-specific-options</a>).
-Darren
On Sun, Feb 5, 2023 at 9:21 AM Michael Schwartzkopff via Kea-users
<a class="moz-txt-link-rfc2396E" href="mailto:kea-users@lists.isc.org"><kea-users@lists.isc.org></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Hi,
I want to implement an option 43 string in the answer of the dhcp
server. especially wand to implement Cisco openpnp as defined here:
<a class="moz-txt-link-freetext" href="https://developer.cisco.com/site/open-plug-n-play/learn/learn-open-pnp-protocol/">https://developer.cisco.com/site/open-plug-n-play/learn/learn-open-pnp-protocol/</a>
The dhcp server should return the string "5A1N;K4;B3;I192.168.100.10".
In ISC dhcpd the following config works:
option space CISCOPNP;
option CISCOPNP.pnpserver code 43 = string;
class "ciscopnp" {
match if option vendor-class-identifier = "ciscopnp";
option vendor-class-identifier "ciscopnp";
vendor-option-space CISCOPNP;
option CISCOPNP.pnpserver = "5A1D;K4;B2;I192.168.100.10";
}
In kea I read a lot of doc, but I was not able to configure the server
correctly.
"Dhcp4": {
"option-def": [
{
"name": "openpnp",
"code": 5,
"space": "vendor-encapsulated-options-space",
"type": "string",
"array": false,
"record-types": "",
"encapsulate": ""
}
]
(...)
subnet {
(...)
"reservations": [
{
"hw-address": "00:b8:b3:6b:69:c0",
"ip-address": "192.168.100.24",
"hostname": "staging01",
"option-data": [
{
"name": "openpnp",
"space": "vendor-encapsulated-options-space",
"code": 5,
"data": "5A1D;K4;B2;I192.168.100.10"
}
]
(...)
But the server does not return the option at all:
DEBUG DHCP4_RESPONSE_DATA [hwtype=1 00:b8:b3:6b:69:c0],
cid=[00:63:69:73:63:6f:2d:30:30:62:38:2e:62:33:36:62:2e:36:39:63:30:2d:56:6c:31],
tid=0x1e47: responding with packet DHCPACK (type 5), packet details:
local_address=192.168.100.10:67, remote_address=255.255.255.255:68,
msg_type=DHCPACK (5), transid=0x1e47,
options:
type=001, len=004: 4294967040 (uint32)
type=006, len=008: 192.0.2.1 192.0.2.2
type=012, len=009: "staging01" (string)
type=015, len=011: "example.org" (string)
type=051, len=004: 3600 (uint32)
type=053, len=001: 5 (uint8)
type=054, len=004: 192.168.100.10
type=058, len=004: 900 (uint32)
type=059, len=004: 1800 (uint32)
type=061, len=025:
00:63:69:73:63:6f:2d:30:30:62:38:2e:62:33:36:62:2e:36:39:63:30:2d:56:6c:31
Any idea what I am missing?
Michael Schwartzkopff
--
ISC funds the development of this software with paid support subscriptions. Contact us at <a class="moz-txt-link-freetext" href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.
To unsubscribe visit <a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>.
Kea-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kea-users@lists.isc.org">Kea-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>
</pre>
</blockquote>
</blockquote>
</body>
</html>