advanced.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. // This is an example configuration file for DHCPv6 server in Kea.
  2. // It attempts to showcase some of the more advanced features.
  3. // Topology wise, it's a basic scenario with one IPv6 subnet configured.
  4. // It is assumed that one subnet (2001:db8:1::/64) is available directly
  5. // over ethX interface.
  6. //
  7. // The following features are currently showcased here:
  8. // 1. Configuration of MAC/hardware address sources in DHCPv6
  9. // 2. RSOO (Relay supplied options) - Some relays may insert options with the
  10. // intention for the server to insert them into client directed messages.
  11. // 3. Control socket. Kea can open a socket and listen for incoming
  12. // commands.
  13. { "Dhcp6":
  14. {
  15. // Kea is told to listen on ethX network interface only.
  16. "interfaces-config": {
  17. "interfaces": [ "ethX" ],
  18. // This makes interfaces to be re-detected at each (re-)configuration.
  19. // By default it is true.
  20. "re-detect": true
  21. },
  22. // We need to specify the the database used to store leases. As of
  23. // September 2016, four database backends are supported: MySQL,
  24. // PostgreSQL, Cassandra, and the in-memory database, Memfile.
  25. // We will use memfile because it doesn't require any prior set up.
  26. "lease-database": {
  27. "type": "memfile",
  28. "lfc-interval": 3600
  29. },
  30. // Kea 0.9.1 introduced MAC/hardware addresses support in DHCPv6. There is
  31. // no single reliable method of getting MAC address information in DHCPv6.
  32. // Kea supports several methods. Depending on your network set up, some
  33. // methods may be more preferable than others, hence the configuration
  34. // parameter. 'mac-sources' is a list of methods. Allowed parameters are:
  35. // any, raw, duid, ipv6-link-local, client-link-addr-option, rfc6939 (which
  36. // is an alias for client-link-addr-option), remote-id, rfc4649 (which is an
  37. // alias for remote-id, subscriber-id, rfc4580 (which is an alias for
  38. // subscriber-id) and docsis.
  39. //
  40. // Note that the order matters. Methods are attempted one by one in the order
  41. // specified until hardware address is obtained. If you don't care which method
  42. // is used, using 'any' is marginally faster than enumerating them all.
  43. //
  44. // If mac-sources are not specified, a default value of 'any' is used.
  45. "mac-sources": [ "client-link-addr-option", "duid", "ipv6-link-local" ],
  46. // RFC6422 defines a mechanism called relay-supplied options option. The relay
  47. // agent may insert certain options that the server will echo back to the
  48. // client, if certain criteria are met. One condition is that the option must
  49. // be RSOO-enabled (i.e. allowed to be echoed back). IANA maintains a list
  50. // of those options here:
  51. // http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#options-relay-supplied
  52. // However, it is possible to allow the server to echo back additional options.
  53. // This entry marks options 110, 120 and 130 as RSOO-enabled.
  54. "relay-supplied-options": [ "110", "120", "130" ],
  55. // This defines a control socket. If defined, Kea will open a UNIX socket
  56. // and will listen for incoming commands. See section 15 of the Kea User's
  57. // Guide for list of supported commands.
  58. "control-socket": {
  59. "socket-type": "unix",
  60. "socket-name": "/tmp/kea6-ctrl-socket"
  61. },
  62. // Addresses will be assigned with preferred and valid lifetimes
  63. // being 3000 and 4000, respectively. Client is told to start
  64. // renewing after 1000 seconds. If the server does not respond
  65. // after 2000 seconds since the lease was granted, client is supposed
  66. // to start REBIND procedure (emergency renewal that allows switching
  67. // to a different server).
  68. "preferred-lifetime": 3000,
  69. "valid-lifetime": 4000,
  70. "renew-timer": 1000,
  71. "rebind-timer": 2000,
  72. // The following list defines subnets. Each subnet consists of at
  73. // least subnet and pool entries.
  74. "subnet6": [
  75. {
  76. "pools": [ { "pool": "2001:db8:1::/80" } ],
  77. // This defines PD (prefix delegation) pools. In this case
  78. // we have only one pool. That consists of /64 prefixes
  79. // being delegated out of large /48 pool. Each delegated
  80. // prefix will contain an excluded-prefix option.
  81. "pd-pools": [
  82. {
  83. "prefix": "2001:db8:abcd::",
  84. "prefix-len": 48,
  85. "delegated-len": 64,
  86. "excluded-prefix": "2001:db8:abcd:1234::",
  87. "excluded-prefix-len": 62
  88. }
  89. ],
  90. "subnet": "2001:db8:1::/64",
  91. "interface": "ethX",
  92. // Sometimes the relay may use an odd IPv6 address that's not matching
  93. // the subnet. This is discouraged, but there are valid cases when it
  94. // makes sense. One case is when the relay has only link-local address
  95. // and another is when there is a shared subnet scenario.
  96. "relay": {
  97. "ip-address": "3000::1"
  98. }
  99. }
  100. ]
  101. },
  102. // The following configures logging. It assumes that messages with at
  103. // least informational level (info, warn, error and fatal) should be
  104. // logged to stdout.
  105. "Logging": {
  106. "loggers": [
  107. {
  108. "name": "kea-dhcp6",
  109. "output_options": [
  110. {
  111. "output": "stdout",
  112. // Several additional parameters are possible in addition
  113. // to the typical output. Flush determines whether logger
  114. // flushes output to a file. Maxsize determines maximum
  115. // filesize before the file is being rotated. maxver
  116. // specifies the maximum number of rotated files being
  117. // kept.
  118. "flush": true,
  119. "maxsize": 204800,
  120. "maxver": 4
  121. }
  122. ],
  123. "debuglevel": 0,
  124. "severity": "INFO"
  125. }
  126. ]
  127. }
  128. }