multiple-options.json 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 the the database used to store leases. As of
  10. # September 2016, four database backends are supported: MySQL,
  11. # PostgreSQL, Cassandra, and the in-memory database, Memfile.
  12. # We'll use memfile because it doesn't require any prior set up.
  13. "lease-database": {
  14. "type": "memfile"
  15. },
  16. # Addresses will be assigned with a lifetime of 4000 seconds.
  17. "valid-lifetime": 4000,
  18. # Renew and rebind timers are commented out. This implies that options
  19. # 58 and 59 will not be sent to the client. In this case it is up to
  20. # the client to pick the timer values according to RFC2131. Uncomment the
  21. # timers to send these options to the client.
  22. # "renew-timer": 1000,
  23. # "rebind-timer": 2000,
  24. # Defining a subnet. There are 3 DHCP options returned to the
  25. # clients connected to this subnet. The first two options are
  26. # identified by the name. The third option is identified by the
  27. # option code.
  28. "subnet4": [
  29. {
  30. "pools": [ { "pool": "192.0.2.10 - 192.0.2.200" } ],
  31. "subnet": "192.0.2.0/24",
  32. "interface": "ethX",
  33. "option-data": [
  34. {
  35. "name": "domain-name-servers",
  36. "data": "192.0.2.1, 192.0.2.2"
  37. },
  38. {
  39. "name": "routers",
  40. "data": "192.0.2.1"
  41. },
  42. {
  43. "code": 15,
  44. "data": "example.org"
  45. }
  46. ]
  47. }
  48. ]
  49. },
  50. # The following configures logging. It assumes that messages with at least
  51. # informational level (info, warn, error and fatal) should be logged to stdout.
  52. "Logging": {
  53. "loggers": [
  54. {
  55. "name": "kea-dhcp4",
  56. "output_options": [
  57. {
  58. "output": "stdout"
  59. }
  60. ],
  61. "severity": "INFO"
  62. }
  63. ]
  64. }
  65. }