wiki:Commands

Version 3 (modified by tomek, 4 years ago) (diff)

--

Control API Requirements

Kea provides a control channel that allows external entity send administrative commands to the server. This document explains rationale that led to certain decisions and enumerates desired capabilities.

WARNING: This document is a work in progress. Expect significant changes. Once this document is more mature, it will be discussed on kea-dev list.

Administrative actions

  1. Kea MUST support shutdown command.
  2. Control channel MUST support accepting commands and sending responses bigger than 1500 bytes. This is required for a number of scenarios: getting all leases from a subnet, getting statistics for multiple subnets when # of subnets is large etc.
  3. MUST support get-config (Kea sends back its current configuration in the response).
  4. MUST support reload-config (Kea reloads its current configuration file from disk).
  5. MUST support set-config (sends new configuration as parameter).

Run-time operations

  1. Kea MUST support (TODO: list all statistics related commands here).

Configuration management

Leases management

  1. Kea MUST support add-lease4 command.
  2. Kea MUST support add-lease6 command.
  3. Kea MUST support get-lease4 command. Available parameters:
    • (v4 address), (hwaddr, subnet-id), (client-id, subnet-id)
  4. Kea MUST support get-lease6 command. Available parameters:
    • (v6 address), (duid, subnet-id)
  5. Kea MUST support update-lease4 command.
  6. Kea MUST support update-lease6 command.
  7. Kea MUST support delete-lease4 command.
  8. Kea MUST support delete-lease6 command.

Reservations management

  1. Kea MUST support add-reservation command that includes IPv4 reservation.
  2. Kea MUST support add-reservation command that includes IPv6 reservation.
  3. Kea MUST support add-reservation command that makes reservation for a hostname.
  4. Kea MUST support add-reservation command that makes reservation based on hardware address.
  5. Kea MUST support add-reservation command that makes reservation based on DUID.
  6. Kea SHOULD support add-reservation command that makes reservation based on remote-id.
  7. Kea SHOULD support add-reservation command that makes reservation based on subscriber-id.
  8. Kea MAY support add-reservation command that makes reservation based on client-id.
  9. Kea SHOULD support add-reservation command that reserves certain v4 options for a client.
  10. Kea SHOULD support add-reservation command that reserves certain v6 options for a client.

get-reservation by IPv4 address get-reservation by IPv6 address get-reservation by hwaddress, subnet-id get-reservation by duid, subnet-id

update-reservation

delete-reservation by IPv4 address delete-reservation by IPv6 address MAY delete-reservation by hwaddress, subnet-id MAY delete-reservation by DUID, subnet-id

Subnets management

MUST support get-subnet4-count MUST support get-subnet6-count MUST support get-subnet4 (by subnet-id), (by index) MUST support get-subnet6 (by subnet-id), (by index) MUST support update-subnet4 MUST support update-subnet6 MUST support add-subnet4 MUST support add-subnet6 MUST support delete-subnet4 MUST support delete-subnet6

TODO: Hmmm, how do we want to refer to specific pools. We currently don't have any indexes.

MUST support get-pools4-count (returns a number of subnets in a given v4 subnet) MUST support get-pools6-count (returns a number of subnets in a given v4 subnet) MUST support add-pool4 MUST support add-pool6 MUST support get-pool4 MUST support get-pool6 MUST support delete-pool4 MUST support delete-pool6

Options management

Need API calls to manage assigned global and per subnet options.

Classification management

Do we need API calls to manage client classification?

Interfaces management

We will most likely need an API to manage interfaces (which interfaces to listen on and which addresses to bind).

Open questions

Q: What to do with the leases when removing pools/subnets? Available options:

  1. Keep them in the DB (useful when removal is temporary)
  2. Keep them, but don't allow the server to renew (that would keep the subnet/leases, but they would expire naturally)
  3. delete them instantly
  4. initiate reconfigure process and delete the leases/subnet afterwards