[Kea-users] got unexpected keyword "valid-lifetime" in reservations map.

Veronique Lefebure Veronique.Lefebure at cern.ch
Wed Feb 22 09:48:39 UTC 2023


Hi,
If you look at https://kea.readthedocs.io/en/latest/grammar/grammar.html you can see that valid_life_time is not an attribute of host-reservations:


reservation_param ::= duid
 753                   | reservation_client_classes
 754                   | client_id_value
 755                   | circuit_id_value
 756                   | flex_id_value
 757                   | ip_address
 758                   | hw_address
 759                   | hostname
 760                   | option_data_list
 761                   | next_server
 762                   | server_hostname
 763                   | boot_file_name
 764                   | user_context
 765                   | comment
 766                   | unknown_map_entry

Cheers,
Veronique
________________________________
From: Kea-users <kea-users-bounces at lists.isc.org> on behalf of Kraishak Mahtha <kraishak.edu at gmail.com>
Sent: Wednesday, February 22, 2023 10:35 AM
To: kea-users at lists.isc.org <kea-users at lists.isc.org>
Subject: [Kea-users] got unexpected keyword "valid-lifetime" in reservations map.

Hi All,

I am using the kea-dhcp of 2.2.0 version, I am trying to add a reservation entry along with a valid lifetime option value but I am facing the syntax issue saying "got unexpected keyword "valid-lifetime" in reservations map".

kea-dhcp4 -t kea-dhcp4.conf. --> syntax validator
Syntax check failed with:  kea-dhcp4.conf  :59.7-22: got unexpected keyword "valid-lifetime" in reservations map.

I took a sample example from the forums and tried as below:
"subnet4": [{
        "subnet": "4.0.0.0/16<http://4.0.0.0/16>",
        "valid-lifetime": 3600,
        "option-data": [
            {
                "data": "test.com<http://test.com>",
                "name": "domain-name"
            },
            {
                "data": "255.255.0.0",
                "name": "subnet-mask"
            },
            {
                "data": "99.99.99.99",
                "name": "routers"
            }
        ],
        "pools": [{
"pool": "4.0.0.2-4.0.0.202"
        }],
        "id": 843191
    }],
 "reservations": [
    {
      "hw-address": "01:23:45:67:89:ab",
      "ip-address": "4.0.0.223",
      "hostname": "example.com<http://example.com>",
      "valid-lifetime": 86400
    }
  ]

I tried moving the reservation section inside the subnet but still I get the same, Can someone who has familiarity with reservation entries can guide me ?


Thanks in advance
Kraishak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230222/573d277e/attachment.htm>


More information about the Kea-users mailing list