multiple-options.json 2.1 KB

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