reservations.json 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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": [ "ethX" ],
  10. # We need to specify lease type. As of May 2014, three backends are supported:
  11. # memfile, mysql and pgsql. We'll just use memfile, because it doesn't require
  12. # any prior set up.
  13. "lease-database": {
  14. "type": "memfile"
  15. },
  16. # This is pretty basic stuff, it has nothing to do with reservations.
  17. "preferred-lifetime": 3000,
  18. "valid-lifetime": 4000,
  19. "renew-timer": 1000,
  20. "rebind-timer": 2000,
  21. # The following list defines subnets. Subnet, pools and interface definitions
  22. # are the same as in the regular scenario, without host reservations.
  23. # least subnet and pool entries.
  24. "subnet6": [
  25. {
  26. "subnet": "2001:db8:1::/48",
  27. "pools": [ { "pool": "2001:db8:1::/80" } ],
  28. "pd-pools": [
  29. {
  30. "prefix": "2001:db8:1:8000::",
  31. "prefix-len": 56,
  32. "delegated-len": 64
  33. }
  34. ],
  35. "interface": "ethX",
  36. # Host reservations. Define two reservations for the 192.0.2.202 and
  37. # 192.0.2.100 address. Note that the latter is a reservation for the
  38. # address which is within the range of the pool of the dynamically
  39. # allocated address. The server will exclude this address from this
  40. # pool and only assign it to the client which has a reservation for
  41. # it.
  42. "reservations": [
  43. # This is a simple host reservation. The host with DUID matching
  44. # specified value will get 2001:db8:1::100 address.
  45. {
  46. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  47. "ip-addresses": [ "2001:db8:1::100" ]
  48. },
  49. # This is similar to the previous one, but this time the reservation is done
  50. # based on hardware/MAC address. The server will do its best to extract
  51. # the hardware/MAC address from received packets.
  52. {
  53. "hw-address": "00:01:02:03:04:05",
  54. "ip-addresses": [ "2001:db8:1::101" ]
  55. },
  56. # This is a bit more advanced configuration. The client with specified
  57. # DUID will get a reserved address, prefix and a hostname.
  58. {
  59. "duid": "01:02:03:04:05:06:07:08:09:0A",
  60. "ip-addresses": [ "2001:db8:1::102" ],
  61. "prefixes": [ "2001:db8:2:abcd::/64" ],
  62. "hostname": "foo.example.com"
  63. }
  64. ]
  65. }
  66. ]
  67. },
  68. # The following configures logging. Kea will log all debug messages
  69. # to /var/log/kea-debug.log file.
  70. "Logging": {
  71. "loggers": [
  72. {
  73. "name": "kea-dhcp6",
  74. "output_options": [
  75. {
  76. "output": "/var/log/kea-debug.log"
  77. }
  78. ],
  79. "debuglevel": 99,
  80. "severity": "DEBUG"
  81. }
  82. ]
  83. }
  84. }