kea-dhcp4.conf 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {
  2. "Dhcp4":
  3. {
  4. "interfaces-config": {
  5. "interfaces": [ "eth0" ]
  6. },
  7. "hooks-libraries": [
  8. {
  9. "library": "/path/to/kea-hook-runscript/kea-hook-runscript.so",
  10. "parameters": {
  11. "script": "/path/to/script.sh"
  12. }
  13. }
  14. ],
  15. "lease-database": {
  16. "type": "memfile"
  17. },
  18. /* Option 121 definition */
  19. "option-def": [
  20. {
  21. "name": "rfc3442-classless-static-routes",
  22. "code": 121,
  23. "space": "dhcp4",
  24. "type": "record",
  25. "array": false,
  26. /* This is not a general option 121, it is specific to this usage with two routes: */
  27. /* Subnet length of destination1 (32), destination1 (X/32), router1, destination2 (0/0), router2 */
  28. "record-types": "uint8, ipv4-address, ipv4-address, uint8, ipv4-address"
  29. }
  30. ],
  31. /* Only use client MAC address, not Client ID */
  32. "match-client-id": false,
  33. /* Set short lifetime, so that routes are removed from the kernel shortly after
  34. a client leaves the network without sending a DHCPRELEASE. */
  35. "valid-lifetime": 300,
  36. "renew-timer": 220,
  37. "rebind-timer": 220,
  38. "host-reservation-identifiers": ["hw-address"],
  39. "subnet4": [
  40. {
  41. /* Hack so that Kea hands out addresses in /32 subnets */
  42. "subnet": "0.0.0.0/32",
  43. /* Send appropriate routes to the client (you should adapt this, see README) */
  44. "option-data": [
  45. {
  46. "name": "rfc3442-classless-static-routes",
  47. /* 10.250.250.1/32 via 0.0.0.0, 0/0 via 10.250.250.1 */
  48. "data": "32, 10.250.250.1, 0.0.0.0, 0, 10.250.250.1"
  49. }
  50. ],
  51. "interface": "eth0",
  52. "reservation-mode": "out-of-pool",
  53. /* IP addresses reserved for clients, can be any /32 address. */
  54. "reservations": [
  55. {
  56. "hw-address": "96:ec:f8:ac:d8:bf",
  57. "ip-address": "192.0.2.201"
  58. },
  59. {
  60. "hw-address": "aa:bb:cc:dd:ee:ff",
  61. "ip-address": "203.0.113.12"
  62. }
  63. ]
  64. }
  65. ]
  66. },
  67. "Logging":
  68. {
  69. "loggers": [
  70. {
  71. "name": "kea-dhcp4",
  72. "output_options": [
  73. {
  74. "output": "stdout"
  75. #"output": "/var/log/kea-dhcp4.log"
  76. }
  77. ],
  78. "severity": "DEBUG",
  79. "debuglevel": 0
  80. }
  81. ]
  82. }
  83. }