backends.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. # "lfc-interval": 3600
  22. # },
  23. # 2. MySQL backend. Leases will be stored in MySQL database. Make sure it
  24. # is up, running and properly initialized. See kea-admin documentation
  25. # for details on how to intialize the database. The only strictly required
  26. # parameters are type and name. If other parameters are not specified,
  27. # Kea will assume the database is avaiable on localhost, that user and
  28. # password is not necessary to connect and that timeout is 5 seconds.
  29. # Kea must be compiled with --with-dhcp-mysql option to use this backend.
  30. # "lease-database": {
  31. # "type": "mysql",
  32. # "name": "keatest",
  33. # "host": "localhost",
  34. # "user": "keatest",
  35. # "password": "secret1",
  36. # "connect-timeout": 3
  37. # },
  38. # 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make
  39. # sure it is up, running and properly initialized. See kea-admin documentation
  40. # for details on how to intialize the database. The only strictly required
  41. # parameters are type and name. If other parameters are not specified,
  42. # Kea will assume the database is avaiable on localhost, that user and
  43. # password is not necessary to connect and that timeout is 5 seconds.
  44. # Kea must be compiled with --with-dhcp-pgsql option to use this backend.
  45. # "lease-database": {
  46. # "type": "pgsql",
  47. # "name": "keatest",
  48. # "host": "localhost",
  49. # "user": "keatest",
  50. # "password": "secret1"
  51. # },
  52. # 4. CQL (Cassandra) backend. Leases will be stored in Cassandra database. Make
  53. # sure it is up, running and properly initialized. See kea-admin documentation
  54. # for details on how to intialize the database. The only strictly required
  55. # parameters are type, keyspace and contact_points. At least one contact point
  56. # must be specified, but more than one is required for redundancy. Make sure
  57. # you specify the contact points without spaces. Kea must be compiled with
  58. # --with-cql option to use this backend.
  59. # "lease-database": {
  60. # "type": "cql",
  61. # "keyspace": "keatest",
  62. # "contact_points": "192.0.2.1,192.0.2.2,192.0.2.3"
  63. # },
  64. # Addresses will be assigned with a lifetime of 4000 seconds.
  65. "valid-lifetime": 4000,
  66. # Renew and rebind timers are commented out. This implies that options
  67. # 58 and 59 will not be sent to the client. In this case it is up to
  68. # the client to pick the timer values according to RFC2131. Uncomment the
  69. # timers to send these options to the client.
  70. # "renew-timer": 1000,
  71. # "rebind-timer": 2000,
  72. # The following list defines subnets. We have only one subnet
  73. # here. We tell Kea that it is directly available over local interface.
  74. "subnet4": [
  75. {
  76. "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
  77. "subnet": "192.0.2.0/24",
  78. "interface": "ethX"
  79. }
  80. ]
  81. },
  82. # The following configures logging. It assumes that messages with at least
  83. # informational level (info, warn, error and fatal) should be logged to stdout.
  84. "Logging": {
  85. "loggers": [
  86. {
  87. "name": "kea-dhcp4",
  88. "output_options": [
  89. {
  90. "output": "stdout"
  91. }
  92. ],
  93. "severity": "INFO"
  94. }
  95. ]
  96. }
  97. }