advanced.json 4.9 KB

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