backends.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # This is an example configuration file for the DHCPv4 server in Kea.
  2. # It is a basic scenario with one IPv4 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. { "Dhcp4":
  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 valid lifetimes being 4000. Client
  64. # is told to start renewing after 1000 seconds. If the server does not respond
  65. # after 2000 seconds since the lease was granted, client is supposed
  66. # to start REBIND procedure (emergency renewal that allows switching
  67. # to a different server).
  68. "valid-lifetime": 4000,
  69. # Renew and rebind timers are commented out. This implies that options
  70. # 58 and 59 will not be sent to the client. In this case it is up to
  71. # the client to pick the timer values according to RFC2131. Uncomment the
  72. # timers to send these options to the client.
  73. # "renew-timer": 1000,
  74. # "rebind-timer": 2000,
  75. # The following list defines subnets. We have only one subnet
  76. # here. We tell Kea that it is directly available over local interface.
  77. "subnet4": [
  78. {
  79. "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
  80. "subnet": "192.0.2.0/24",
  81. "interface": "ethX"
  82. }
  83. ]
  84. },
  85. # The following configures logging. It assumes that messages with at least
  86. # informational level (info, warn, error) will will be logged to stdout.
  87. "Logging": {
  88. "loggers": [
  89. {
  90. "name": "kea-dhcp4",
  91. "output_options": [
  92. {
  93. "output": "stdout"
  94. }
  95. ],
  96. "severity": "INFO"
  97. }
  98. ]
  99. }
  100. }