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 <[email protected]> on behalf of Kraishak Mahtha 
<[email protected]>
Sent: Wednesday, February 22, 2023 10:35 AM
To: [email protected] <[email protected]>
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
-- 
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
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to