cassandra.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 demonstrates
  3. // how to configure Kea to use CQL (Cassandra) backend
  4. { "Dhcp4":
  5. {
  6. // Kea is told to listen on ethX interface only.
  7. "interfaces-config": {
  8. "interfaces": [ "ethX" ]
  9. },
  10. // 4. CQL (Cassandra) backend. Leases will be stored in Cassandra
  11. // database. Make sure it is up, running and properly initialized. See
  12. // kea-admin documentation for details on how to initialize the
  13. // database. The only strictly required parameters are type, keyspace
  14. // and contact-points. At least one contact point must be specified, but
  15. // more than one is required for redundancy. Make sure you specify the
  16. // contact points without spaces. Kea must be compiled with --with-cql
  17. // option to use this backend.
  18. "lease-database": {
  19. "type": "cql",
  20. "keyspace": "keatest",
  21. "contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
  22. "port": 9042
  23. },
  24. // Addresses will be assigned with a lifetime of 4000 seconds.
  25. "valid-lifetime": 4000,
  26. // Renew and rebind timers are commented out. This implies that options
  27. // 58 and 59 will not be sent to the client. In this case it is up to
  28. // the client to pick the timer values according to RFC2131. Uncomment the
  29. // timers to send these options to the client.
  30. // "renew-timer": 1000,
  31. // "rebind-timer": 2000,
  32. // The following list defines subnets. We have only one subnet
  33. // here. We tell Kea that it is directly available over local interface.
  34. "subnet4": [
  35. {
  36. "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
  37. "subnet": "192.0.2.0/24",
  38. "interface": "ethX"
  39. }
  40. ]
  41. },
  42. // The following configures logging. It assumes that messages with at
  43. // least informational level (info, warn, error and fatal) should be
  44. // logged to stdout.
  45. "Logging": {
  46. "loggers": [
  47. {
  48. "name": "kea-dhcp4",
  49. "output_options": [
  50. {
  51. "output": "stdout"
  52. }
  53. ],
  54. "severity": "INFO"
  55. }
  56. ]
  57. }
  58. }