hooks.json 1.38 KB
Newer Older
1 2 3
// This is an example configuration file for the DHCPv6 server in Kea
// illustrating the configuration of hooks libraries.  It uses a basic scenario
// of one IPv6 subnet configured with the default values for all parameters.
Stephen Morris's avatar
Stephen Morris committed
4 5 6 7

{"Dhcp6":

{
8
// Kea is told to listen on the ethX interface only.
Stephen Morris's avatar
Stephen Morris committed
9 10 11 12
  "interfaces-config": {
    "interfaces": [ "ethX" ]
  },

13
// Set up the storage for leases.
Stephen Morris's avatar
Stephen Morris committed
14 15 16 17
  "lease-database": {
    "type": "memfile"
  },

18
// Set values to mandatory timers
19 20 21 22 23
  "renew-timer": 900,
  "rebind-timer": 1200,
  "preferred-lifetime": 1800,
  "valid-lifetime": 2700,

24
// Define a single subnet.
Stephen Morris's avatar
Stephen Morris committed
25 26
  "subnet6": [
    {
27 28 29 30 31
      "pools": [
        {
          "pool": "2001:db8:1::/80",
          "user-context": { "charging": true }
        } ],
Stephen Morris's avatar
Stephen Morris committed
32 33 34 35 36
      "subnet": "2001:db8:1::/64",
      "interface": "ethX"
    }
  ],

37 38 39 40 41
// Set up the hooks libraries.  For this example, we assume that two libraries
// are loaded, called "security" and "charging".  Note that order is important:
// "security" is specified first so if both libraries supply a hook function
// for a given hook, the function in "security" will be called before that in
// "charging".
Stephen Morris's avatar
Stephen Morris committed
42 43 44 45 46 47

  "hooks-libraries": [
     {
        "library": "/opt/lib/security.so"
     },
     {
48 49 50 51 52
        "library": "/opt/lib/charging.so",
        "parameters": {
             "path": "/var/kea/var",
             "base-name": "kea-forensic6"
        }
Stephen Morris's avatar
Stephen Morris committed
53 54 55 56 57
     }
  ]
}

}