config.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <chapter id="kea-config">
  7. <title>Kea configuration</title>
  8. <para>Depending on configuration backend chosen (see <xref
  9. linkend="dhcp-config-backend"/>), configuration mechanisms are
  10. different. The following sections describe details of specific configuration
  11. backends. Note that only one configuration backend can be used and its
  12. selection is determined during compilation time.</para>
  13. <section id="bundy-backend">
  14. <title>Bundy configuration backend</title>
  15. <para>This legacy configuration backend allows Kea to use former BIND10
  16. framework. That framework and this Kea configuration backend is no longer
  17. supported by ISC. It is currently developed as part of Bundy project (see
  18. <ulink url="http://bundy-dns.de">Bundy homepage</ulink>). See Bundy
  19. project documentation regarding configuration.</para>
  20. </section>
  21. <section id="json-backend">
  22. <title>JSON configuration backend</title>
  23. <para>JSON is the default configuration backend and the only one supported
  24. as of 0.9 release. It assumes that the servers are started from command
  25. line (either directly or using a script, see TODO for details). JSON
  26. backend uses certain signals to influence certain behaviors. The
  27. configuration file is specified upon startup using -c parameter.</para>
  28. <section id="json-format">
  29. <title>JSON syntax</title>
  30. <para>Configuration files for DHCPv4, DHCPv6 and DDNS modules are
  31. defined in extended JSON format. The basic JSON is defined in <ulink
  32. url="http://tools.ietf.org/html/rfc4627">RFC 4627</ulink>. Kea
  33. components use extended JSON, which extends basic format by allowing
  34. bash-style comments in the file. Comment lines must have hash (#) in the
  35. first column.</para>
  36. <para>Configuration file consists of a single object (often colloquially
  37. called a map) started with a curly bracket. It consists "Dhcp4",
  38. "Dhcp6", "DhcpDdns" and/or "Logging" objects. It is possible to define
  39. additional elements, but they will be ignored. That principle was chosen
  40. to ease configuration management. For example, it is possible to define
  41. Dhcp4, Dhcp6 and Logging elements in one configuration file that can be
  42. used to start both DHCPv4 and DHCPv6 components. When starting, DHCPv4
  43. component will use Dhcp4 object to configure itself and Logging to
  44. configure logging parameters, while ignoring Dhcp6 object.</para>
  45. <para>For example, a very simple configuration for Dhcp6 could look
  46. like this:
  47. <screen>
  48. {
  49. # DHCPv6 specific configuration starts here.
  50. "Dhcp6": {
  51. # These are DHCPv6-specific parameters. They will be explained in later sections.
  52. "interfaces": [ "eth0" ],
  53. "preferred-lifetime": 3000,
  54. "valid-lifetime": 4000,
  55. "renew-timer": 1000,
  56. "rebind-timer": 2000,
  57. # The following list defines subnets. Each subnet consists of at
  58. # least subnet and pool entries.
  59. "subnet6": [{
  60. "pool": [ "2001:db8:1::/80" ],
  61. "subnet": "2001:db8:1::/64"
  62. }]
  63. },
  64. # DHCPv6 specific configuration ends here.
  65. # Logger parameters (that could be shared among several components) start here.
  66. "Logging": {
  67. # These are Logger-specific parameters. They will be explained in later sections.
  68. "loggers": [{
  69. "name": "*",
  70. "severity": "DEBUG"
  71. }]
  72. }
  73. # Logger parameters end here.
  74. }
  75. </screen>
  76. </para>
  77. <para>
  78. More examples are available in the Kea source code in the
  79. <filename>doc/examples</filename> directory.
  80. </para>
  81. </section>
  82. <!-- @todo Add a reference here after #3422 is done -->
  83. </section>
  84. </chapter>