reservations.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. # The following list defines subnets. Subnet, pools and interface definitions
  24. # are the same as in the regular scenario, without host reservations.
  25. # least subnet and pool entries.
  26. "subnet6": [
  27. {
  28. "subnet": "2001:db8:1::/48",
  29. "pools": [ { "pool": "2001:db8:1::/80" } ],
  30. "pd-pools": [
  31. {
  32. "prefix": "2001:db8:1:8000::",
  33. "prefix-len": 56,
  34. "delegated-len": 64
  35. }
  36. ],
  37. "interface": "ethX",
  38. # Host reservations. Define two reservations for the 192.0.2.202 and
  39. # 192.0.2.100 address. Note that the latter is a reservation for the
  40. # address which is within the range of the pool of the dynamically
  41. # allocated address. The server will exclude this address from this
  42. # pool and only assign it to the client which has a reservation for
  43. # it.
  44. "reservations": [
  45. # This is a simple host reservation. The host with DUID matching
  46. # specified value will get 2001:db8:1::100 address.
  47. {
  48. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  49. "ip-addresses": [ "2001:db8:1::100" ]
  50. },
  51. # This is similar to the previous one, but this time the reservation is done
  52. # based on hardware/MAC address. The server will do its best to extract
  53. # the hardware/MAC address from received packets.
  54. {
  55. "hw-address": "00:01:02:03:04:05",
  56. "ip-addresses": [ "2001:db8:1::101" ]
  57. },
  58. # This is a bit more advanced configuration. The client with specified
  59. # DUID will get a reserved address, prefix and a hostname.
  60. {
  61. "duid": "01:02:03:04:05:06:07:08:09:0A",
  62. "ip-addresses": [ "2001:db8:1::102" ],
  63. "prefixes": [ "2001:db8:2:abcd::/64" ],
  64. "hostname": "foo.example.com"
  65. }
  66. ]
  67. }
  68. ]
  69. },
  70. # The following configures logging. Kea will log all debug messages
  71. # to /var/log/kea-debug.log file.
  72. "Logging": {
  73. "loggers": [
  74. {
  75. "name": "kea-dhcp6",
  76. "output_options": [
  77. {
  78. "output": "/var/log/kea-debug.log"
  79. }
  80. ],
  81. "debuglevel": 99,
  82. "severity": "DEBUG"
  83. }
  84. ]
  85. }
  86. }