mysql-reservations.json 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 the the database used to store leases. As of
  12. # September 2016, four database backends are supported: MySQL,
  13. # PostgreSQL, Cassandra, and the in-memory database, Memfile.
  14. # We'll use memfile because it doesn't require 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. # Kea supports two types of identifiers in DHCPv6: hw-address (hardware/MAC address
  24. # of the client) and duid (DUID inserted by the client). When told to do so, Kea can
  25. # check for each of these identifier types, but it takes a costly database lookup
  26. # to do so. It is therefore useful from a performance perspective to use only
  27. # the reservation types that are actually used in a given network.
  28. "host-reservation-identifiers": [ "duid", "hw-address" ],
  29. # Specify connection to the database holding host reservations. The type
  30. # specifies that the MySQL database is used. user and password are the
  31. # credentials used to connect to the database. host and name specify
  32. # location of the host where the database instance is running, and the
  33. # name of the database to use. The server processing a packet will first
  34. # check if there are any reservations specified for this client in the
  35. # reservations list, within the subnet (configuration file). If there are
  36. # no reservations there, the server will try to retrieve reservations
  37. # from this database.
  38. "hosts-database": {
  39. "type": "mysql",
  40. "name": "kea",
  41. "user": "kea",
  42. "password": "kea",
  43. "host": "localhost",
  44. "readonly": true
  45. },
  46. # Define a subnet with a pool of dynamic addresses and a pool of dynamic
  47. # prefixes. Addresses and prefixes from those pools will be assigned to
  48. # clients which don't have reservations in the database. Subnet identifier
  49. # is equal to 1. If this subnet is selected for the client, this subnet
  50. # id will be used to search for the reservations within the database.
  51. "subnet6": [
  52. {
  53. "subnet": "2001:db8:1::/48",
  54. "pools": [ { "pool": "2001:db8:1::/80" } ],
  55. "pd-pools": [
  56. {
  57. "prefix": "2001:db8:1:8000::",
  58. "prefix-len": 56,
  59. "delegated-len": 64
  60. }
  61. ],
  62. "interface": "ethX",
  63. "id": 1
  64. }
  65. ]
  66. },
  67. # The following configures logging. It assumes that messages with at least
  68. # informational level (info, warn, error and fatal) should be logged to stdout.
  69. "Logging": {
  70. "loggers": [
  71. {
  72. "name": "kea-dhcp6",
  73. "output_options": [
  74. {
  75. "output": "stdout"
  76. }
  77. ],
  78. "debuglevel": 0,
  79. "severity": "INFO"
  80. }
  81. ]
  82. }
  83. }