reservations.json 4.6 KB

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