Debian Codegraph @

cmds/coredhcp/config.yml.example

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