advanced.json 4.0 KB

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