reservations.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # This is an example configuration file for DHCPv6 server in Kea
  2. # that showcases how to do host reservations. It is
  3. # assumed that one subnet (2001:db8:1::/64) is available directly
  4. # over ethX interface. A number of hosts have various combinations
  5. # of addresses and prefixes reserved for them.
  6. { "Dhcp6":
  7. {
  8. # Kea is told to listen on ethX interface only.
  9. "interfaces-config": {
  10. "interfaces": [ "ethX" ]
  11. },
  12. # We need to specify lease type. As of May 2014, three backends are supported:
  13. # memfile, mysql and pgsql. We'll just use memfile, because it doesn't require
  14. # any prior set up.
  15. "lease-database": {
  16. "type": "memfile"
  17. },
  18. # This is pretty basic stuff, it has nothing to do with reservations.
  19. "preferred-lifetime": 3000,
  20. "valid-lifetime": 4000,
  21. "renew-timer": 1000,
  22. "rebind-timer": 2000,
  23. # Kea supports two types of identifiers in DHCPv6: hw-address (hardware/MAC address
  24. # of the client) and duid (DUID inserted by the client). When told to do so, Kea can
  25. # check for each of these identifier types, but it takes a costly database lookup
  26. # to do so. It is therefore useful from a performance perspective to use only
  27. # the reservation types that are actually used in a given network.
  28. "host-reservation-identifiers": [ "duid", "hw-address" ],
  29. # The following list defines subnets. Subnet, pools and interface definitions
  30. # are the same as in the regular scenario, without host reservations.
  31. # least subnet and pool entries.
  32. "subnet6": [
  33. {
  34. "subnet": "2001:db8:1::/48",
  35. "pools": [ { "pool": "2001:db8:1::/80" } ],
  36. "pd-pools": [
  37. {
  38. "prefix": "2001:db8:1:8000::",
  39. "prefix-len": 56,
  40. "delegated-len": 64
  41. }
  42. ],
  43. "interface": "ethX",
  44. # Host reservations. Define several reservations, note that
  45. # they are all within the range of the pool of the dynamically
  46. # allocated address. The server will exclude the addresses from this
  47. # pool and only assign them to the client which has a reservation for
  48. # them.
  49. "reservations": [
  50. # This is a simple host reservation. The host with DUID matching
  51. # the specified value will get an address of 2001:db8:1::100.
  52. {
  53. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  54. "ip-addresses": [ "2001:db8:1::100" ]
  55. },
  56. # This is similar to the previous one, but this time the reservation is done
  57. # based on hardware/MAC address. The server will do its best to extract
  58. # the hardware/MAC address from received packets (see 'mac-sources' directive
  59. # for details). This particular reservation also specifies two extra options
  60. # to be available for this client. If there are options with the same code
  61. # specified in a global, subnet or class scope, the values defined at host level
  62. # take precedence.
  63. {
  64. "hw-address": "00:01:02:03:04:05",
  65. "ip-addresses": [ "2001:db8:1::101" ],
  66. "option-data": [
  67. {
  68. "name": "dns-servers",
  69. "data": "3000:1::234"
  70. },
  71. {
  72. "name": "nis-servers",
  73. "data": "3000:1::234"
  74. }]
  75. },
  76. # This is a bit more advanced reservation. The client with the specified
  77. # DUID will get a reserved address, a reserved prefix and a hostname.
  78. # This reservation is for an address that it not within the dynamic pool.
  79. # Finally, this reservation features vendor specific options for CableLabs,
  80. # which happen to use enterprise-id 4491. Those particular values will
  81. # be returned only to the client that has a DUID matching this reservation.
  82. {
  83. "duid": "01:02:03:04:05:06:07:08:09:0A",
  84. "ip-addresses": [ "2001:db8:1:cafe::1" ],
  85. "prefixes": [ "2001:db8:2:abcd::/64" ],
  86. "hostname": "foo.example.com",
  87. "option-data": [ {
  88. "name": "vendor-opts",
  89. "data": "4491"
  90. },
  91. {
  92. "name": "tftp-servers",
  93. "space": "vendor-4491",
  94. "data": "3000:1::234"
  95. } ]
  96. }
  97. ]
  98. }
  99. ]
  100. },
  101. # The following configures logging. Kea will log all debug messages
  102. # to /var/log/kea-debug.log file.
  103. "Logging": {
  104. "loggers": [
  105. {
  106. "name": "kea-dhcp6",
  107. "output_options": [
  108. {
  109. "output": "/var/log/kea-debug.log"
  110. }
  111. ],
  112. "debuglevel": 99,
  113. "severity": "DEBUG"
  114. }
  115. ]
  116. }
  117. }