pgsql-reservations.json 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # This is an example configuration file for the DHCPv6 server in Kea.
  2. # It contains configuration of the PostgreSQL host database backend, used
  3. # to retrieve reserved addresses, host names, DHCPv4 message fields
  4. # and DHCP options from PostgreSQL database.
  5. { "Dhcp6":
  6. {
  7. # Kea is told to listen on ethX interface only.
  8. "interfaces-config": {
  9. "interfaces": [ "ethX" ]
  10. },
  11. # We need to specify the the database used to store leases. As of
  12. # September 2016, four database backends are supported: MySQL,
  13. # PostgreSQL, Cassandra, and the in-memory database, Memfile.
  14. # We'll use memfile because it doesn't require any prior set up.
  15. "lease-database": {
  16. "type": "memfile"
  17. },
  18. # This is pretty basic stuff, it has nothing to do with reservations.
  19. "preferred-lifetime": 3000,
  20. "valid-lifetime": 4000,
  21. "renew-timer": 1000,
  22. "rebind-timer": 2000,
  23. # Kea supports two types of identifiers in DHCPv6: hw-address (hardware/MAC address
  24. # of the client) and duid (DUID inserted by the client). When told to do so, Kea can
  25. # check for each of these identifier types, but it takes a costly database lookup
  26. # to do so. It is therefore useful from a performance perspective to use only
  27. # the reservation types that are actually used in a given network.
  28. "host-reservation-identifiers": [ "duid", "hw-address" ],
  29. # Specify connection to the database holding host reservations. The type
  30. # specifies that the PostgreSQL database is used. user and password are the
  31. # credentials used to connect to the database. host and name specify
  32. # location of the host where the database instance is running, and the
  33. # name of the database to use. The server processing a packet will first
  34. # check if there are any reservations specified for this client in the
  35. # reservations list, within the subnet (configuration file). If there are
  36. # no reservations there, the server will try to retrieve reservations
  37. # from this database.
  38. "hosts-database": {
  39. "type": "postgresql",
  40. "name": "kea",
  41. "user": "kea",
  42. "password": "kea",
  43. "host": "localhost"
  44. },
  45. # Define a subnet with a pool of dynamic addresses and a pool of dynamic
  46. # prefixes. Addresses and prefixes from those pools will be assigned to
  47. # clients which don't have reservations in the database. Subnet identifier
  48. # is equal to 1. If this subnet is selected for the client, this subnet
  49. # id will be used to search for the reservations within the database.
  50. "subnet6": [
  51. {
  52. "subnet": "2001:db8:1::/48",
  53. "pools": [ { "pool": "2001:db8:1::/80" } ],
  54. "pd-pools": [
  55. {
  56. "prefix": "2001:db8:1:8000::",
  57. "prefix-len": 56,
  58. "delegated-len": 64
  59. }
  60. ],
  61. "interface": "ethX",
  62. "id": 1
  63. }
  64. ]
  65. },
  66. # The following configures logging. It assumes that messages with at least
  67. # informational level (info, warn, error and fatal) should be logged to stdout.
  68. "Logging": {
  69. "loggers": [
  70. {
  71. "name": "kea-dhcp6",
  72. "output_options": [
  73. {
  74. "output": "stdout"
  75. }
  76. ],
  77. "debuglevel": 0,
  78. "severity": "INFO"
  79. }
  80. ]
  81. }
  82. }