config.yml.example 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # CoreDHCP configuration (yaml)
  2. # In this file, lines starting with "## " represent default values,
  3. # while uncommented lines are examples which have no default value
  4. # The base level configuration has two sections, one for each protocol version
  5. # (DHCPv4 and DHCPv6). There is no shared configuration at the moment.
  6. # At a high level, both accept the same structure of configuration
  7. # DHCPv6 configuration
  8. server6:
  9. # listen is an optional section to specify how the server binds to an
  10. # interface or address.
  11. # If unset, the server will join the link-layer multicast group for all
  12. # dhcp servers and relays on each interface, as well as the site-scoped
  13. # multicast group for all dhcp servers.
  14. # Note that in this default configuration the server will not handle
  15. # unicast datagrams, and is equivalent to:
  16. ## listen:
  17. ## - "[ff02::1:2]"
  18. ## - "[ff05::1:3]"
  19. # In general, listen takes a list of addresses, with the general syntax
  20. # "[address%interface]:port", where each part is optional.
  21. # Omitting the address results in the wildcard address being used
  22. # Omitting the interface skips binding the listener to a specific interface
  23. # and listens on all interfaces instead
  24. # Omitting the port uses the default port for DHCPv6 (547)
  25. #
  26. # For example:
  27. # - "[::]"
  28. # Listen on the wildcard address on all interfaces on the default port.
  29. # Note that no multicast group will be joined, so this will *not* work with
  30. # most clients
  31. #
  32. # - ":44480"
  33. # Listens on the wildcard address on a specific port. This can be used if
  34. # you have a relay setup that can contact this server using unicast
  35. #
  36. # - "[::%eno1]"
  37. # Listens on the wildcard address on one interface. This can be used if you
  38. # want to spawn multiple servers with different configurations for multiple
  39. # interfaces, behind a relay that can use unicast
  40. #
  41. # There are some special considerations for multicast:
  42. # - "[ff02::1:2%eno1]"
  43. # Listens on a link-layer multicast address bound to an interface. Also
  44. # used to spawn multiple servers, but for clients on the same subnet
  45. #
  46. # - "[ff05::1:3%eno1]"
  47. # Joining a multicast group with an interface allows to skip the default
  48. # routing table when responding to clients, which can be useful if
  49. # multicast is not otherwise configured system-wide
  50. #
  51. # - "[ff02::1:2]"
  52. # Using a multicast address without an interface will be auto-expanded, so
  53. # that it listens on all available interfaces
  54. # plugins is a mandatory section, which defines how requests are handled.
  55. # It is a list of maps, matching plugin names to their arguments.
  56. # The order is meaningful, as incoming requests are handled by each plugin
  57. # in turn. There is no default value for a plugin configuration, and a
  58. # plugin that is not mentioned will not be loaded at all
  59. #
  60. # The following contains examples of the most common, builtin plugins.
  61. # External plugins should document their arguments in their own
  62. # documentations or readmes
  63. plugins:
  64. # server_id is mandatory for RFC-compliant operation.
  65. # - server_id: <DUID format> <LL address>
  66. # The supported DUID formats are LL and LLT
  67. - server_id: LL 00:de:ad:be:ef:00
  68. # file serves leases defined in a static file, matching link-layer addresses to IPs
  69. # - file: <file name> [autorefresh]
  70. # The file format is one lease per line, "<hw address> <IPv6>"
  71. # When the 'autorefresh' argument is given, the plugin will try to refresh
  72. # the lease mapping during runtime whenever the lease file is updated.
  73. - file: "leases.txt"
  74. # dns adds information about available DNS resolvers to the responses
  75. # - dns: <resolver IP> <... resolver IPs>
  76. - dns: 2001:4860:4860::8888 2001:4860:4860::8844
  77. # nbp can add information about the location of a network boot program
  78. # - nbp: <NBP URL>
  79. - nbp: "http://[2001:db8:a::1]/nbp"
  80. # prefix provides prefix delegation.
  81. # - prefix: <prefix> <allocation size>
  82. # prefix is the prefix pool from which the allocations will be carved
  83. # allocation size is the maximum size for prefixes that will be allocated to clients
  84. # EG for allocating /64 or smaller prefixes within 2001:db8::/48 :
  85. - prefix: 2001:db8::/48 64
  86. # DHCPv4 configuration
  87. server4:
  88. # listen is an optional section to specify how the server binds to an
  89. # interface or address.
  90. # If unset, the server will listen on the broadcast address on all
  91. # interfaces, equivalent to:
  92. ## listen:
  93. ## - "0.0.0.0"
  94. # In general, listen takes a list of addresses, with the general syntax
  95. # "address%interface:port", where each part is optional.
  96. # * Omitting the address results in the wildcard address being used
  97. # * Omitting the interface skips binding the listener to a specific interface
  98. # and listens on all interfaces instead
  99. # * Omitting the port uses the default port for DHCPv4 (67)
  100. #
  101. # For example:
  102. # - ":44480" Listens on a specific port.
  103. # - "%eno1" Listens on the wildcard address on one interface.
  104. # - "192.0.2.1%eno1:44480" with all parts
  105. # plugins is a mandatory section, which defines how requests are handled.
  106. # It is a list of maps, matching plugin names to their arguments.
  107. # The order is meaningful, as incoming requests are handled by each plugin
  108. # in turn. There is no default value for a plugin configuration, and a
  109. # plugin that is not mentioned will not be loaded at all
  110. #
  111. # The following contains examples of the most common, builtin plugins.
  112. # External plugins should document their arguments in their own
  113. # documentations or readmes
  114. plugins:
  115. # lease_time sets the default lease time for advertised leases
  116. # - lease_time: <duration>
  117. # The duration can be given in any format understood by go's
  118. # "ParseDuration": https://golang.org/pkg/time/#ParseDuration
  119. - lease_time: 3600s
  120. # server_id advertises a DHCP Server Identifier, to help resolve
  121. # situations where there are multiple DHCP servers on the network
  122. # - server_id: <IP address>
  123. # The IP address should be one address where this server is reachable
  124. - server_id: 10.10.10.1
  125. # dns advertises DNS resolvers usable by the clients on this network
  126. # - dns: <IP address> <...IP addresses>
  127. - dns: 8.8.8.8 8.8.4.4
  128. # router is mandatory, and advertises the address of the default router
  129. # for this network
  130. # - router: <IP address>
  131. - router: 192.168.1.1
  132. # netmask advertises the network mask for the IPs assigned through this
  133. # server
  134. # - netmask: <network mask>
  135. - netmask: 255.255.255.0
  136. # range allocates leases within a range of IPs
  137. # - range: <lease file> <start IP> <end IP> <lease duration>
  138. # * the lease file is an initially empty file where the leases that are
  139. # allocated to clients will be stored across server restarts
  140. # * lease duration can be given in any format understood by go's
  141. # "ParseDuration": https://golang.org/pkg/time/#ParseDuration
  142. - range: leases.txt 10.10.10.100 10.10.10.200 60s
  143. # staticroute advertises additional routes the client should install in
  144. # its routing table as described in RFC3442
  145. # - staticroute: <destination>,<gateway> [<destination>,<gateway> ...]
  146. # where destination should be in CIDR notation and gateway should be
  147. # the IP address of the router through which the destination is reachable
  148. # - staticroute: 10.20.20.0/24,10.10.10.1