backends.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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
  57. // database. Make sure it is up, running and properly initialized. See
  58. // kea-admin documentation for details on how to initialize the
  59. // database. The only strictly required parameters are type, keyspace
  60. // and contact-points. At least one contact point must be specified, but
  61. // more than one is required for redundancy. Make sure you specify the
  62. // contact points without spaces. Kea must be compiled with --with-cql
  63. // option to use this backend.
  64. // "lease-database": {
  65. // "type": "cql",
  66. // "keyspace": "keatest",
  67. // "contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
  68. // "port": 9042
  69. // },
  70. // Addresses will be assigned with preferred and valid lifetimes
  71. // being 3000 and 4000, respectively. Client is told to start
  72. // renewing after 1000 seconds. If the server does not respond
  73. // after 2000 seconds since the lease was granted, client is supposed
  74. // to start REBIND procedure (emergency renewal that allows switching
  75. // to a different server).
  76. "preferred-lifetime": 3000,
  77. "valid-lifetime": 4000,
  78. "renew-timer": 1000,
  79. "rebind-timer": 2000,
  80. // The following list defines subnets. Each subnet consists of at
  81. // least subnet and pool entries.
  82. "subnet6": [
  83. {
  84. "pools": [ { "pool": "2001:db8:1::/80" } ],
  85. "subnet": "2001:db8:1::/64",
  86. "interface": "ethX"
  87. }
  88. ]
  89. },
  90. // The following configures logging. It assumes that messages with at
  91. // least informational level (info, warn, error and fatal) should be
  92. // logged to stdout.
  93. "Logging": {
  94. "loggers": [
  95. {
  96. "name": "kea-dhcp6",
  97. "output_options": [
  98. {
  99. "output": "stdout"
  100. }
  101. ],
  102. "debuglevel": 0,
  103. "severity": "INFO"
  104. }
  105. ]
  106. }
  107. }