hooks.json 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // This is an example configuration file for the DHCPv4 server in Kea
  2. // illustrating the configuration of hooks libraries. It uses a basic scenario
  3. // of one IPv4 subnet configured with the default values for all parameters.
  4. {"Dhcp4":
  5. {
  6. // Kea is told to listen on the ethX interface only.
  7. "interfaces-config": {
  8. "interfaces": [ "ethX" ]
  9. },
  10. // Set up the storage for leases.
  11. "lease-database": {
  12. "type": "memfile"
  13. },
  14. "valid-lifetime": 1800,
  15. // Define a single subnet.
  16. "subnet4": [
  17. {
  18. "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
  19. "subnet": "192.0.2.0/24",
  20. "interface": "ethX"
  21. }
  22. ],
  23. // Set up the hooks libraries. For this example, we assume that two libraries
  24. // are loaded, called "security" and "charging". Note that order is important:
  25. // "security" is specified first so if both libraries supply a hook function
  26. // for a given hook, the function in "security" will be called before that in
  27. // "charging".
  28. "hooks-libraries": [
  29. {
  30. "library": "/opt/lib/security.so"
  31. },
  32. {
  33. "library": "/opt/lib/charging.so",
  34. "parameters": {
  35. "path": "/var/kea/var",
  36. "base-name": "kea-forensic6"
  37. }
  38. }
  39. ]
  40. }
  41. }