hooks.json 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. }
  35. ]
  36. }
  37. }