From: Tomek Mrugalski Date: Tue, 31 Jul 2018 13:23:16 +0000 (+0200) Subject: [5683] Doc updated. X-Git-Tag: ha_phase2~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=356e9cb9ed3edee439cc1518ca26784d59ec7997;p=thirdparty%2Fkea.git [5683] Doc updated. --- diff --git a/doc/guide/hooks-lease-cmds.xml b/doc/guide/hooks-lease-cmds.xml index 62ae594dce..f88e062f0b 100644 --- a/doc/guide/hooks-lease-cmds.xml +++ b/doc/guide/hooks-lease-cmds.xml @@ -20,7 +20,7 @@ errors, like adding a lease with subnet-id that does not exist in the configuration or configuring a lease to use an address that is outside of the subnet to which it is supposed to belong. - It provides a not programmatic way to manage user contexts + It provides a non programmatic way to manage user contexts associated to leases. @@ -128,17 +128,20 @@ lease4-add, lease6-add commands lease4-add and lease6-add - commands allow for the creation of a new lease. Typically Kea creates a lease - on its own, when it first sees a new device. However, sometimes it may - be convenient to create the lease administratively. The - lease4-add command requires at least three - parameters: an IPv4 address, a subnet-id and an identifier: hardware - (MAC) address. The simplest successful call might look as follows: + commands allow for the creation of a new lease. Typically Kea creates + a lease on its own, when it first sees a new device. However, + sometimes it may be convenient to create the lease + administratively. The lease4-add command requires + at least two parameters: an IPv4 address, and an identifier: hardware + (MAC) address. A third parameter, subnet-id, used to be mandatory in + Kea 1.4.0, but since 1.5.0 it is optional. If not specified, Kea will + try to figure its value out on its own by running a subnet selection + procedure. If specified, however, its value much match existing + subnet. The simplest successful call might look as follows: { "command": "lease4-add", "arguments": { - "subnet-id": 44, "ip-address": "192.0.2.202", "hw-address": "1a:1b:1c:1d:1e:1f" } @@ -146,10 +149,12 @@ - lease6-add command requires four - parameters: an IPv6 address, a subnet-id, and IAID value - (identity association identifier, a value sent by clients) and - a DUID: + lease6-add command requires four parameters: an + IPv6 address, and IAID value (identity association identifier, a value + sent by clients) and a DUID. The same principle for subnet-id as in + lease4-add applies. If not specified, Kea will try to figure its value + out on its own by running a subnet selection procedure. If specified, + however, its value much match existing subnet. For example: { "command": "lease6-add", @@ -162,10 +167,11 @@ } lease6-add can be also used to add leases for IPv6 -prefixes. In this case there are two parameters that must be -specified: type (set to value of "IA_PD") and a prefix -length. The actual prefix is set using ip-address field. For example, -to configure a lease for prefix 2001:db8:abcd::/48, the following +prefixes. In this case there are three additional parameters that must be +specified: subnet-id, type (set to value of "IA_PD") and a prefix +length. The actual prefix is set using ip-address field. Note that Kea is not +able to guess subnet-id values for prefixes, so it must be specified explicitly. +For example, to configure a lease for prefix 2001:db8:abcd::/48, the following command can be used: @@ -660,6 +666,11 @@ An example IPv4 lease deletion by "hw-address" looks as follows: leaseX-del followed by leaseX-add commands. + Subnet-id parameter, used to be mandatory in Kea 1.4.0, but it + is optional since 1.5.0. If not specified, Kea will try to figure its + value out on its own by running a subnet selection procedure. If + specified, however, its value much match existing subnet. + The optional boolean parameter "force-create" specifies if the lease should be created if it doesn't exist in the database. It defaults to false, which indicates that the lease is not created