2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 15:05:16 +00:00

[#1180] Addressed review comments

This commit is contained in:
Thomas Markwalder
2020-05-19 11:20:29 -04:00
parent 098dd18824
commit 61d4807245

View File

@@ -14,28 +14,28 @@ added in the near future.
``kea-dhcp6`` process. ``kea-dhcp6`` process.
The Leasequery library is part of the premium source code and is The Leasequery library is part of the premium source code and is
available to ISC's paid support customers. available to ISC's paid support customers.
.. lease-query-dhcpv4: .. lease-query-dhcpv4:
DHCPv4 Leasequery DHCPv4 Leasequery
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
DHCPv4 simple Leasequery provides a requestor the ability to query for DHCPv4 simple Leasequery provides a requester the ability to query for
active lease information for either a single IP address or a single client. active lease information for either a single IP address or a single client.
RFC 4388 calls for three such queries: RFC 4388 calls for three such queries:
- Query by IP address - Query by IP address
The IP address of interest is contained within the ``ciaddr`` field of The IP address of interest is contained within the ``ciaddr`` field of
the query. the query.
- Query by hardware address - Query by hardware address
The hardware address of interest is contained with the ``chaddr`` field The hardware address of interest is contained with the ``chaddr`` field
of the query. of the query.
- Query by client identifier - Query by client identifier
The client identifier of interest is sent in the dhcp-client-identifier The client identifier of interest is sent in the dhcp-client-identifier
option (61) of the query. option (61) of the query.
The inbound DHCPLEASEQUERY packet must supply only one of the three values The inbound DHCPLEASEQUERY packet must supply only one of the three values
above. Queries which supply more than one of these values are dropped. above. Queries which supply more than one of these values are dropped.
In addition, the query must contain the IP address of the requester in In addition, the query must contain the IP address of the requester in
@@ -45,21 +45,21 @@ list of IP addresses which are permitted to query. This list of valid
requester addresses is specified as part of the Leasequery hook library's requester addresses is specified as part of the Leasequery hook library's
configuration (See the section on configuration below). configuration (See the section on configuration below).
In response to a valid query, the server will return one of three message In response to a valid query, the server will return one of three message
types: types:
- DHCPLEASEUNKNOWN - DHCPLEASEUNKNOWN
Returned when the IP address of interest is not one the server knows Returned when the IP address of interest is not one the server knows
about (query by IP address); or there are no active leases for the about (query by IP address); or there are no active leases for the
client of interest (query by hardware address or client id). client of interest (query by hardware address or client id).
- DHCPLEASEUNASSIGNED - DHCPLEASEUNASSIGNED
Returned when the IP address is one the server knows of but for which Returned when the IP address is one the server knows of but for which
there are no active leases (applies only to query by IP address). there are no active leases (applies only to query by IP address).
- DHCPLEASEACTIVE - DHCPLEASEACTIVE
Returned when there is at least one active lease found matching the Returned when there is at least one active lease found matching the
criteria. criteria.
For both DHCPLEASEUNKNOWN and DHCPLEASEUNASSIGNED responses, the only For both DHCPLEASEUNKNOWN and DHCPLEASEUNASSIGNED responses, the only
information sent back to the requester in response is the query parameter information sent back to the requester in response is the query parameter
@@ -75,41 +75,42 @@ In addition, one or more of the following options will be included:
.. tabularcolumns:: |p{0.2\linewidth}|p{0.1\linewidth}|p{0.7\linewidth}| .. tabularcolumns:: |p{0.2\linewidth}|p{0.1\linewidth}|p{0.7\linewidth}|
.. table:: DHCPLEASEACTIVTE Options .. table:: DHCPLEASEACTIVE Options
:class: longtable :class: longtable
:widths: 20 10 70 :widths: 20 10 70
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| Option | Code | Content | | Option | Code | Content |
+=============================+=======+===============================================+ +==============================+=======+===============================================+
| dhcp-client-identifier | 61 | copied from the lease (if one) | | dhcp-client-identifier | 61 | copied from the lease (if one) |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| client-last-transction-time | 91 | amount of time that has elapsed since the | | client-last-tranasction-time | 91 | amount of time that has elapsed since the |
| (CLTT) | | lease's actual CLTT. This value will also be | | (CLTT) | | lease's client-last-transation-time (CLTT) |
| | | used by the server to adjust life time and | | | | This value will also be used by the server to |
| | | timer values. | | | | adjust life time and timer values. |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| dhcp-lease-time | 51 | lease's life time reduced by CLTT | | dhcp-lease-time | 51 | lease's life time reduced by CLTT |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| dhcp-renewal-time | 58 | as controlled by kea-dhcp4 configuration and | | dhcp-renewal-time | 58 | as controlled by kea-dhcp4 configuration and |
| | | then reduced by CLTT | | | | then reduced by CLTT |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| dhcp-rebind-time | 59 | as dictacted by kea-dhcp4 configuration and | | dhcp-rebind-time | 59 | as dictacted by kea-dhcp4 configuration and |
| | | then reduced by CLTT | | | | then reduced by CLTT |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| dhcp-agent-options | 82 | if stored on the lease. (See | | dhcp-agent-options | 82 | if stored on the lease. (See |
| | | :ref:`dhcp4-store-extended-info`) | | | | :ref:`dhcp4-store-extended-info`) |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
| associated-ip | 92 | a list of all other IP addresses for which the| | associated-ip | 92 | a list of all other IP addresses for which |
| | | the client has active leases. (Does not apply | | | | the client has active leases. (Does not apply |
| | | to query by IP address) | | | | to query by IP address) |
+-----------------------------+-------+-----------------------------------------------+ +------------------------------+-------+-----------------------------------------------+
The dhcp-server-identifier option (54) will be returned in all responses in keeping with The dhcp-server-identifier option (54) will be returned in all responses in keeping with
RFC 2131 section 4.3.1. RFC 2131 section 4.3.1.
RFC 4388 allows requestors to request specific options via a PRL (Option 55). RFC 4388 allows requesters to ask for specific options via the
This is not currently supported but may be added at a future date. dhcp-parameter-request-list (PRL, option 55). This is not currently supported but
may be added at a future date.
.. lease-query-dhcpv4-config: .. lease-query-dhcpv4-config:
@@ -120,7 +121,7 @@ Configuring the Leasequery hook library for use is straight forward. It current
supports a single parameter, ``requesters``, which is a list of IP addresses from supports a single parameter, ``requesters``, which is a list of IP addresses from
which DHCPLEASEQUERY packets will be accepted. In other words, it is a list of which DHCPLEASEQUERY packets will be accepted. In other words, it is a list of
known requesters. The following shows an example configuration with two requester known requesters. The following shows an example configuration with two requester
addresses: addresses:
:: ::