reservations.json 4.7 KB

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