mysql-reservations.json 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # This is an example configuration file for the DHCPv6 server in Kea.
  2. # It contains configuration of the MySQL host database backend, used
  3. # to retrieve reserved addresses, host names, DHCPv4 message fields
  4. # and DHCP options from MySQL database.
  5. { "Dhcp6":
  6. {
  7. # Kea is told to listen on ethX interface only.
  8. "interfaces-config": {
  9. "interfaces": [ "ethX" ]
  10. },
  11. # We need to specify lease type. As of May 2014, three backends are supported:
  12. # memfile, mysql and pgsql. We'll just use memfile, because it doesn't require
  13. # any prior set up.
  14. "lease-database": {
  15. "type": "memfile"
  16. },
  17. # This is pretty basic stuff, it has nothing to do with reservations.
  18. "preferred-lifetime": 3000,
  19. "valid-lifetime": 4000,
  20. "renew-timer": 1000,
  21. "rebind-timer": 2000,
  22. # Kea supports two types of identifiers in DHCPv6: hw-address (hardware/MAC address
  23. # of the client) and duid (DUID inserted by the client). When told to do so, Kea can
  24. # check for each of these identifier types, but it takes a costly database lookup
  25. # to do so. It is therefore useful from a performance perspective to use only
  26. # the reservation types that are actually used in a given network.
  27. "host-reservation-identifiers": [ "duid", "hw-address" ],
  28. # Specify connection to the database holding host reservations. The type
  29. # specifies that the MySQL database is used. user and password are the
  30. # credentials used to connect to the database. host and name specify
  31. # location of the host where the database instance is running, and the
  32. # name of the database to use. The server processing a packet will first
  33. # check if there are any reservations specified for this client in the
  34. # reservations list, within the subnet (configuration file). If there are
  35. # no reservations there, the server will try to retrieve reservations
  36. # from this database.
  37. "hosts-database": {
  38. "type": "mysql",
  39. "name": "kea",
  40. "user": "kea",
  41. "password": "kea",
  42. "host": "localhost"
  43. },
  44. # Define a subnet with a pool of dynamic addresses and a pool of dynamic
  45. # prefixes. Addresses and prefixes from those pools will be assigned to
  46. # clients which don't have reservations in the database. Subnet identifier
  47. # is equal to 1. If this subnet is selected for the client, this subnet
  48. # id will be used to search for the reservations within the database.
  49. "subnet6": [
  50. {
  51. "subnet": "2001:db8:1::/48",
  52. "pools": [ { "pool": "2001:db8:1::/80" } ],
  53. "pd-pools": [
  54. {
  55. "prefix": "2001:db8:1:8000::",
  56. "prefix-len": 56,
  57. "delegated-len": 64
  58. }
  59. ],
  60. "interface": "ethX",
  61. "id": 1
  62. }
  63. ]
  64. },
  65. # The following configures logging. Kea will log all debug messages
  66. # to /var/log/kea-debug.log file.
  67. "Logging": {
  68. "loggers": [
  69. {
  70. "name": "kea-dhcp6",
  71. "output_options": [
  72. {
  73. "output": "/var/log/kea-debug.log"
  74. }
  75. ],
  76. "debuglevel": 99,
  77. "severity": "DEBUG"
  78. }
  79. ]
  80. }
  81. }