backends.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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 demonstrates
  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. "persist": true,
  22. "lfc-interval": 3600
  23. },
  24. # 2. MySQL backend. Leases will be stored in MySQL database. Make sure it
  25. # is up, running and properly initialized. See kea-admin documentation
  26. # for details on how to initialize the database. The only strictly required
  27. # parameters are type and name. If other parameters are not specified,
  28. # Kea will assume the database is available on localhost, that user and
  29. # password is not necessary to connect and that timeout is 5 seconds.
  30. # Kea must be compiled with --with-dhcp-mysql option to use this backend.
  31. # "lease-database": {
  32. # "type": "mysql",
  33. # "name": "keatest",
  34. # "host": "localhost",
  35. # "port": 3306,
  36. # "user": "keatest",
  37. # "password": "secret1",
  38. # "connect-timeout": 3
  39. # },
  40. # 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make
  41. # sure it is up, running and properly initialized. See kea-admin documentation
  42. # for details on how to initialize the database. The only strictly required
  43. # parameters are type and name. If other parameters are not specified,
  44. # Kea will assume the database is available on localhost, that user and
  45. # password is not necessary to connect and that timeout is 5 seconds.
  46. # Kea must be compiled with --with-dhcp-pgsql option to use this backend.
  47. # "lease-database": {
  48. # "type": "pgsql",
  49. # "name": "keatest",
  50. # "host": "localhost",
  51. # "port": 5432,
  52. # "user": "keatest",
  53. # "password": "secret1",
  54. # "connect-timeout": 3
  55. # },
  56. # 4. CQL (Cassandra) backend. Leases will be stored in Cassandra database. Make
  57. # sure it is up, running and properly initialized. See kea-admin documentation
  58. # for details on how to initialize the database. The only strictly required
  59. # parameters are type, keyspace and contact-points. At least one contact point
  60. # must be specified, but more than one is required for redundancy. Make sure
  61. # you specify the contact points without spaces. Kea must be compiled with
  62. # --with-cql option to use this backend.
  63. # "lease-database": {
  64. # "type": "cql",
  65. # "keyspace": "keatest",
  66. # "contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
  67. # "port": 9042
  68. # },
  69. # Addresses will be assigned with preferred and valid lifetimes
  70. # being 3000 and 4000, respectively. Client is told to start
  71. # renewing after 1000 seconds. If the server does not respond
  72. # after 2000 seconds since the lease was granted, client is supposed
  73. # to start REBIND procedure (emergency renewal that allows switching
  74. # to a different server).
  75. "preferred-lifetime": 3000,
  76. "valid-lifetime": 4000,
  77. "renew-timer": 1000,
  78. "rebind-timer": 2000,
  79. # The following list defines subnets. Each subnet consists of at
  80. # least subnet and pool entries.
  81. "subnet6": [
  82. {
  83. "pools": [ { "pool": "2001:db8:1::/80" } ],
  84. "subnet": "2001:db8:1::/64",
  85. "interface": "ethX"
  86. }
  87. ]
  88. },
  89. # The following configures logging. It assumes that messages with at least
  90. # informational level (info, warn, error and fatal) should be logged to stdout.
  91. "Logging": {
  92. "loggers": [
  93. {
  94. "name": "kea-dhcp6",
  95. "output_options": [
  96. {
  97. "output": "stdout"
  98. }
  99. ],
  100. "debuglevel": 0,
  101. "severity": "INFO"
  102. }
  103. ]
  104. }
  105. }