multiple-options.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 3 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. // String options that have a comma in their values need to have
  50. // it escaped (i.e. each comma is predeced by two backslashes). That's
  51. // because commas are reserved for separating fields in compound
  52. // options. At the same time, we need to be conformant with JSON spec,
  53. // that does not allow "\,". Therefore the slightly uncommon double
  54. // backslashes natation is needed.
  55. "name": "new-posix-timezone",
  56. "data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00"
  57. }
  58. ],
  59. "pools": [
  60. {
  61. "pool": "2001:db8:1::1 - 2001:db8:1::100",
  62. "option-data": [
  63. {
  64. "code": 12,
  65. "data": "3001:cafe::21"
  66. }
  67. ]
  68. },
  69. {
  70. "pool": "2001:db8:1::500 - 2001:db8:1::1000"
  71. }
  72. ],
  73. "subnet": "2001:db8:1::/64",
  74. "interface": "ethX"
  75. }
  76. ]
  77. },
  78. # The following configures logging. It assumes that messages with at least
  79. # informational level (info, warn, error and fatal) should be logged to stdout.
  80. "Logging": {
  81. "loggers": [
  82. {
  83. "name": "kea-dhcp6",
  84. "output_options": [
  85. {
  86. "output": "stdout"
  87. }
  88. ],
  89. "debuglevel": 0,
  90. "severity": "INFO"
  91. }
  92. ]
  93. }
  94. }