multiple-options.json 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # This is an example configuration file for the DHCPv4 server in Kea.
  2. # It demonstrates simple configuration of the options for a subnet.
  3. { "Dhcp4":
  4. {
  5. # Kea is told to listen on ethX interface only.
  6. "interfaces-config": {
  7. "interfaces": [ "ethX" ]
  8. },
  9. # We need to specify lease type. As of May 2014, three backends are supported:
  10. # memfile, mysql and pgsql. We'll just use memfile, because it doesn't require
  11. # any prior set up.
  12. "lease-database": {
  13. "type": "memfile"
  14. },
  15. # Addresses will be assigned with valid lifetimes being 4000. Client
  16. # is told to start renewing after 1000 seconds. If the server does not respond
  17. # after 2000 seconds since the lease was granted, client is supposed
  18. # to start REBIND procedure (emergency renewal that allows switching
  19. # to a different server).
  20. "valid-lifetime": 4000,
  21. # Renew and rebind timers are commented out. This implies that options
  22. # 58 and 59 will not be sent to the client. In this case it is up to
  23. # the client to pick the timer values according to RFC2131. Uncomment the
  24. # timers to send these options to the client.
  25. # "renew-timer": 1000,
  26. # "rebind-timer": 2000,
  27. # Defining a subnet. There are 3 DHCP options returned to the
  28. # clients connected to this subnet. The first two options are
  29. # identified by the name. The third option is identified by the
  30. # option code.
  31. "subnet4": [
  32. {
  33. "pools": [ { "pool": "192.0.2.10 - 192.0.2.200" } ],
  34. "subnet": "192.0.2.0/24",
  35. "interface": "ethX",
  36. "option-data": [
  37. {
  38. "name": "domain-name-servers",
  39. "data": "192.0.2.1, 192.0.2.2"
  40. },
  41. {
  42. "name": "routers",
  43. "data": "192.0.2.1"
  44. },
  45. {
  46. "code": 15,
  47. "data": "example.org"
  48. }
  49. ]
  50. }
  51. ]
  52. },
  53. # The following configures logging. It assumes that messages with at least
  54. # informational level (info, warn, error) will will be logged to stdout.
  55. "Logging": {
  56. "loggers": [
  57. {
  58. "name": "kea-dhcp4",
  59. "output_options": [
  60. {
  61. "output": "stdout"
  62. }
  63. ],
  64. "severity": "INFO"
  65. }
  66. ]
  67. }
  68. }