hooks.json 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # This is an example configuration file for the DHCPv6 server in Kea
  2. # illustrating the configuration of hooks libraries. It uses a basic scenario
  3. # of one IPv6 subnet configured with the default values for all parameters.
  4. {"Dhcp6":
  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. # Set values to mandatory timers
  15. "renew-timer": 900,
  16. "rebind-timer": 1200,
  17. "preferred-lifetime": 1800,
  18. "valid-lifetime": 2700,
  19. # Define a single subnet.
  20. "subnet6": [
  21. {
  22. "pools": [
  23. {
  24. "pool": "2001:db8:1::/80",
  25. "user-context": { "charging": true }
  26. } ],
  27. "subnet": "2001:db8:1::/64",
  28. "interface": "ethX"
  29. }
  30. ],
  31. # Set up the hooks libraries. For this example, we assume that two libraries
  32. # are loaded, called "security" and "charging". Note that order is important:
  33. # "security" is specified first so if both libraries supply a hook function
  34. # for a given hook, the function in "security" will be called before that in
  35. # "charging".
  36. "hooks-libraries": [
  37. {
  38. "library": "/opt/lib/security.so"
  39. },
  40. {
  41. "library": "/opt/lib/charging.so",
  42. "parameters": {
  43. "path": "/var/kea/var",
  44. "base-name": "kea-forensic6"
  45. }
  46. }
  47. ]
  48. }
  49. }