multiple-options.json 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. # For DHCPv6 subnets can have prefix delegation pools too so
  38. # a pd-pools with an option-data is defined too.
  39. "subnet6": [
  40. {
  41. "option-data": [
  42. {
  43. "name": "dns-servers",
  44. "data": "2001:db8:2::45, 2001:db8:2::100"
  45. },
  46. {
  47. "code": 12,
  48. "data": "2001:db8:1:0:ff00::1"
  49. }
  50. ],
  51. "pools": [
  52. {
  53. "pool": "2001:db8:1::1 - 2001:db8:1::100",
  54. "option-data": [
  55. {
  56. "code": 12,
  57. "data": "3001:cafe::21"
  58. }
  59. ]
  60. },
  61. {
  62. "pool": "2001:db8:1::500 - 2001:db8:2::1000"
  63. }
  64. ],
  65. "pd-pools": [
  66. {
  67. "prefix": "2001:2b8:2::",
  68. "prefix-len": 56,
  69. "delegated-len": 64,
  70. "option-data": [
  71. {
  72. "code": 12,
  73. "data": "3001:cafe::12:"
  74. }
  75. ]
  76. }
  77. ],
  78. "subnet": "2001:db8:1::/64",
  79. "interface": "ethX"
  80. }
  81. ]
  82. },
  83. # The following configures logging. It assumes that messages with at least
  84. # informational level (info, warn, error and fatal) should be logged to stdout.
  85. "Logging": {
  86. "loggers": [
  87. {
  88. "name": "kea-dhcp6",
  89. "output_options": [
  90. {
  91. "output": "stdout"
  92. }
  93. ],
  94. "debuglevel": 0,
  95. "severity": "INFO"
  96. }
  97. ]
  98. }
  99. }