backends.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # This is an example configuration file for the DHCPv6 server in Kea.
  2. # It is a basic scenario with one IPv6 subnet configured. It demnstrates
  3. # how to configure Kea to use various backends to store leases:
  4. # - memfile
  5. # - MySQL
  6. # - PostgreSQL
  7. # - CQL (Cassandra) backend
  8. { "Dhcp6":
  9. {
  10. # Kea is told to listen on ethX interface only.
  11. "interfaces-config": {
  12. "interfaces": [ "ethX" ]
  13. },
  14. # We need to specify lease type. Exactly one lease-database section
  15. # should be present. Make sure you uncomment only one.
  16. # 1. memfile backend. Leases information will be stored in flat CSV file.
  17. # This is the easiest backend to use as it does not require any extra
  18. # dependencies or services running.
  19. "lease-database": {
  20. "type": "memfile"
  21. },
  22. # 2. MySQL backend. Leases will be stored in MySQL database. Make sure it
  23. # is up, running and properly initialized. See kea-admin documentation
  24. # for details on how to intialize the database. The only strictly required
  25. # parameters are type and name. If other parameters are not specified,
  26. # Kea will assume the database is avaiable on localhost, that user and
  27. # password is not necessary to connect and that timeout is 5 seconds.
  28. # Kea must be compiled with --with-dhcp-mysql option to use this backend.
  29. # "lease-database": {
  30. # "type": "mysql",
  31. # "name": "keatest",
  32. # "host": "localhost",
  33. # "user": "keatest",
  34. # "password": "secret1",
  35. # "connect-timeout": 3
  36. # },
  37. # 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make
  38. # sure it is up, running and properly initialized. See kea-admin documentation
  39. # for details on how to intialize the database. The only strictly required
  40. # parameters are type and name. If other parameters are not specified,
  41. # Kea will assume the database is avaiable on localhost, that user and
  42. # password is not necessary to connect and that timeout is 5 seconds.
  43. # Kea must be compiled with --with-dhcp-pgsql option to use this backend.
  44. # "lease-database": {
  45. # "type": "pgsql",
  46. # "name": "keatest",
  47. # "host": "localhost",
  48. # "user": "keatest",
  49. # "password": "secret1"
  50. # },
  51. # 4. CQL (Cassandra) backend. Leases will be stored in Cassandra database. Make
  52. # sure it is up, running and properly initialized. See kea-admin documentation
  53. # for details on how to intialize the database. The only strictly required
  54. # parameters are type, keyspace and contact_points. At least one contact point
  55. # must be specified, but more than one is required for redundancy. Make sure
  56. # you specify the contact points without spaces. Kea must be compiled with
  57. # --with-cql option to use this backend.
  58. # "lease-database": {
  59. # "type": "cql",
  60. # "keyspace": "keatest",
  61. # "contact_points": "192.0.2.1,192.0.2.2,192.0.2.3"
  62. # },
  63. # Addresses will be assigned with preferred and valid lifetimes
  64. # being 3000 and 4000, respectively. Client is told to start
  65. # renewing after 1000 seconds. If the server does not respond
  66. # after 2000 seconds since the lease was granted, client is supposed
  67. # to start REBIND procedure (emergency renewal that allows switching
  68. # to a different server).
  69. "preferred-lifetime": 3000,
  70. "valid-lifetime": 4000,
  71. "renew-timer": 1000,
  72. "rebind-timer": 2000,
  73. # The following list defines subnets. Each subnet consists of at
  74. # least subnet and pool entries.
  75. "subnet6": [
  76. {
  77. "pools": [ { "pool": "2001:db8:1::/80" } ],
  78. "subnet": "2001:db8:1::/64",
  79. "interface": "ethX"
  80. }
  81. ]
  82. },
  83. # The following configures logging. Kea will log all debug messages
  84. # to /var/log/kea-debug.log file.
  85. "Logging": {
  86. "loggers": [
  87. {
  88. "name": "kea-dhcp6",
  89. "output_options": [
  90. {
  91. "output": "/var/log/kea-debug.log"
  92. }
  93. ],
  94. "debuglevel": 0,
  95. "severity": "INFO"
  96. }
  97. ]
  98. }
  99. }