[Kea-users] got unexpected keyword "valid-lifetime" in reservations map.
Veronique Lefebure
Veronique.Lefebure at cern.ch
Wed Feb 22 14:57:44 UTC 2023
I don't know. You should probably test, or get the answer of an expert.
________________________________
From: Kraishak Mahtha <kraishak.edu at gmail.com>
Sent: Wednesday, February 22, 2023 11:19 AM
To: Veronique Lefebure <Veronique.Lefebure at cern.ch>
Cc: kea-users at lists.isc.org <kea-users at lists.isc.org>
Subject: Re: [Kea-users] got unexpected keyword "valid-lifetime" in reservations map.
Hi Veronique,
So for a reservation entry, if we want to define a lease time that is different from subnet can we do as follows? i.e define only the option 51(dhcp-lease-time) will this be efficient ?
"subnet4": [
{
"subnet": "4.0.0.0/16<http://4.0.0.0/16>",
"valid-lifetime": 3600,
"reservations": [
{
"ip-address": "4.0.255.243",
"hostname": "3G00034Phone",
"valid-lifetime": 126,
"hw-address": "aa:bb:cc:dd:ee:55",
"option-data": [
{
"data": "126",
"name": "dhcp-lease-time"
},
{
"data": "4.0.0.1",
"name": "routers"
}
]
}
],
"option-data": [
{
"data": "test.com<http://test.com>",
"name": "domain-name"
},
{
"data": "255.255.0.0",
"name": "subnet-mask"
},
{
"data": "4.0.0.1",
"name": "routers"
}
],
"pools": [
{
"pool": "4.0.0.2-4.0.0.202"
}
],
"id": 843191
}
]
Thanks
Kraishak
On Wed, Feb 22, 2023 at 3:18 PM Veronique Lefebure <Veronique.Lefebure at cern.ch<mailto:Veronique.Lefebure at cern.ch>> wrote:
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<mailto:kea-users-bounces at lists.isc.org>> on behalf of Kraishak Mahtha <kraishak.edu at gmail.com<mailto:kraishak.edu at gmail.com>>
Sent: Wednesday, February 22, 2023 10:35 AM
To: kea-users at lists.isc.org<mailto:kea-users at lists.isc.org> <kea-users at lists.isc.org<mailto: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/ff1a44e8/attachment-0001.htm>
More information about the Kea-users
mailing list