multiple-options.json 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # This is an example configuration file for DHCPv6 server in Kea.
  2. # It demonstrates simple configuration of the options for a subnet.
  3. { "Dhcp6":
  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 preferred and valid lifetimes
  17. # being 3000 and 4000, respectively. Client is told to start
  18. # renewing after 1000 seconds. If the server does not respond
  19. # after 2000 seconds since the lease was granted, client is supposed
  20. # to start REBIND procedure (emergency renewal that allows switching
  21. # to a different server).
  22. "preferred-lifetime": 3000,
  23. "valid-lifetime": 4000,
  24. "renew-timer": 1000,
  25. "rebind-timer": 2000,
  26. # Defining a subnet. There are 2 DHCP options returned to the
  27. # clients connected to this subnet. The first option is identified
  28. # by the name. The second option is identified by the code.
  29. # There are two address pools defined within this subnet. Pool
  30. # specific value for option 12 is defined for the pool:
  31. # 2001:db8:1::1 - 2001:db8:1::100. Clients obtaining an address
  32. # from this pool will be assigned option 12 with a value of
  33. # 3001:cafe::21. Clients belonging to this subnet but obtaining
  34. # addresses from the other pool, or the clients obtaining
  35. # stateless configuration will be assigned subnet specific value
  36. # of option 12, i.e. 2001:db8:1:0:ff00::1.
  37. "subnet6": [
  38. {
  39. "option-data": [
  40. {
  41. "name": "dns-servers",
  42. "data": "2001:db8:2::45, 2001:db8:2::100"
  43. },
  44. {
  45. "code": 12,
  46. "data": "2001:db8:1:0:ff00::1"
  47. },
  48. ],
  49. "pools": [
  50. {
  51. "pool": "2001:db8:1::1 - 2001:db8:1::100",
  52. "option-data": [
  53. {
  54. "code": 12,
  55. "data": "3001:cafe::21"
  56. }
  57. ]
  58. },
  59. {
  60. "pool": "2001:db8:1::500 - 2001:db8:2::1000"
  61. }
  62. ],
  63. "subnet": "2001:db8:1::/64",
  64. "interface": "ethX",
  65. }
  66. ]
  67. },
  68. # The following configures logging. It assumes that messages with at least
  69. # informational level (info, warn, error and fatal) should be logged to stdout.
  70. "Logging": {
  71. "loggers": [
  72. {
  73. "name": "kea-dhcp6",
  74. "output_options": [
  75. {
  76. "output": "stdout"
  77. }
  78. ],
  79. "debuglevel": 0,
  80. "severity": "INFO"
  81. }
  82. ]
  83. }
  84. }