[Kea-users] Option 43 problems

Darren Ankney darren.ankney at gmail.com
Sun Feb 5 18:16:37 UTC 2023


Hi Michael,

Look for lines like the example below in your logs for the
00:b8:b3:6b:69:c0 client

2023-02-05 13:07:42.347 INFO  [kea-dhcp4.leases/1173.139921790785408]
DHCP4_LEASE_ALLOC [hwtype=1 24:6f:28:7e:d0:60], cid=[no info],
tid=0xa445ecd9: lease 192.168.30.102 has been allocated for 28800
seconds

Make sure the line contains:

 [hwtype=1 00:b8:b3:6b:69:c0]

and

lease 192.168.100.24

so that you can confirm that the client was indeed leased the reserved
address.  That option isn't going to be set outside of that
reservation.

I apologize if you've already looked at that.

-Darren

On Sun, Feb 5, 2023 at 12:07 PM Michael Schwartzkopff via Kea-users
<kea-users at lists.isc.org> wrote:
>
> Hi,
>
>
> the client requests option 43:
>
> 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)
>
>
> but the server to option 43 in the answer:
>
> 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,
> 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
>
>
> Config in debug:
>
> DEBUG DHCP4_CONFIG_START DHCPv4 server is processing the following configuration:
>
> {
> (...)
> "option-data": [
>   { "data": "192.0.2.1, 192.0.2.2", "name": "domain-name-servers" },
>   { "code": 5, "data": "5A1D;K4;B2;I192.168.100.10", "name": "openpnp", "space": "vendor-encapsulated-options-space" },
>   { "code": 15, "data": "example.org" }, { "data": "mydomain.example.com, example.com", "name": "domain-search" },
>   { "data": "0xf0", "name": "default-ip-ttl" }
> ],
> "option-def":
>   [
>     (...)
>     { "array": false, "code": 5, "encapsulate": "", "name": "openpnp", "record-types": "", "space": "vendor-encapsulated-options-space", "type": "string" }
>   ],
> "subnet4":
>   [
>     { "option-data":
>       [
>         { "always-send": true, "code": 5, "data": "A1D;K4;B2;I192.168.100.10", "name": "openpnp", "space": "vendor-encapsulated-options-sp
> ace" }
>       ],
>       "pools": [ { "pool": "192.168.100.64 - 192.168.100.127" } ],
>       "reservations": [ { "hostname": "staging01", "hw-address": "00:b8:b3:6
> 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
> enpnp", "space": "vendor-encapsulated-options-space" }
>         ]
>       }
>     ],
>     "subnet": "192.168.100.0/24"
>     }
>   ], "valid-lifetime": 3600 }
>
>
> On 05.02.23 16:02, Darren Ankney wrote:
>
> 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
> https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp4-srv.html#dhcpv4-vendor-specific-options).
>
> -Darren
>
> On Sun, Feb 5, 2023 at 9:21 AM Michael Schwartzkopff via Kea-users
> <kea-users at lists.isc.org> wrote:
>
> 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:
> https://developer.cisco.com/site/open-plug-n-play/learn/learn-open-pnp-protocol/
>
>
>
> 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 https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


More information about the Kea-users mailing list