You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/manual/dhcp.rst
+40-11Lines changed: 40 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,31 +6,60 @@ DHCP is used to automatically provide clients with an IP address (instead of cli
6
6
DHCP is available for both IPv4 and IPv6 clients, referred to as DHCPv4 and DHCPv6, respectively.
7
7
8
8
---------------------------
9
-
Context and future
9
+
Available Options
10
10
---------------------------
11
11
12
+
There are different DHCP servers to choose from:
12
13
13
-
By default OPNsense implements the widely used `ISC DHCP <https://www.isc.org/dhcp/>`__ server, but as this product has
14
-
reached its `end of life <https://www.isc.org/blogs/isc-dhcp-eol/>`__ we choose to add an alternative (`KEA <https://www.isc.org/kea/>`__) as of version 24.1
15
-
as a first step in deprecating this piece of software.
14
+
- `Dnsmasq <https://thekelleys.org.uk/dnsmasq/doc.html>`__ (since version 25.7)
15
+
- `KEA <https://www.isc.org/kea/>`__ (since version 24.1)
16
+
- `ISC <https://www.isc.org/dhcp/>`__ (EOL)
16
17
17
-
Since the code in our system is rather old (originates from M0n0wall) and the data behind it is not structured in a way that
18
-
would be easily migratable to something more modern, we choose to add KEA as a second option and will not try to build a drop-in replacement.
19
-
Long term ISC will be removed from OPNsense, but no official date has been set yet.
18
+
Additionally, there is a dedicated DHCP relay:
20
19
21
-
If you want to tryout KEA in OPNsense, just disable the legacy dhcp server on the specific interface and
22
-
go to the KEA DHCP menu available under :menuselection:`Services --> Kea DHCP`.
20
+
- `Dhcrelay <https://man.freebsd.org/cgi/man.cgi?query=dhcrelay>`__ (since version 24.7)
21
+
22
+
.. Note::
23
+
24
+
Dnsmasq is the new default DHCP server in version 25.7 and supersedes ISC. It is recommended for small and medium sized setups up to
25
+
a thousand clients. Read more about the deployment differences between KEA and Dnsmasq here: `Dnsmasq </manual/dnsmasq.html#dhcp-service>`__
26
+
27
+
.. Note::
28
+
29
+
KEA is the correct choice for large HA (High Availability) setups with more than a thousand clients in many different DHCP ranges.
30
+
Dnsmasq can be used for smaller HA setups as alternative, though it does not offer lease synchronization like KEA.
23
31
24
32
...............................
25
33
Reservations
26
34
...............................
27
35
28
-
Both ISC DHCP and KEA DHCP offer the possibility to reserve an IP address for a specific client. This is useful when a client
29
-
needs to have the same IP address every time it connects to the network. Both services also offer the ability to define reservations
36
+
ISC, KEA and Dnsmasq offer the possibility to reserve an IP address for a specific client. This is useful when a client
37
+
needs to have the same IP address every time it connects to the network. All services also offer the ability to define reservations
30
38
inside and outside of the assigned pool of dynamic IP addresses. However, you should only define reservations outside of the pool.
31
39
Unless you can guarantee that this client is online at all times when the reservation is in the dynamic range, the DHCP server is
32
40
free to offer this IP address to a different client when the first client goes offline.
33
41
42
+
.. Note::
43
+
44
+
In Dnsmasq static DHCPv4 pools can be configured for reservations.
45
+
46
+
--------------------
47
+
Dnsmasq DNS & DHCP
48
+
--------------------
49
+
50
+
Dnsmasq is a lightweight DNS, router advertisement and DHCP server.
51
+
It is intended to provide coupled DNS and DHCP service to a LAN.
52
+
Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server.
53
+
54
+
The dnsmasq DHCP server supports static address assignments and multiple networks.
55
+
It automatically sends a sensible default set of DHCP options, and can be configured to send any desired set of DHCP options, including vendor-encapsulated options.
56
+
57
+
The dnsmasq DHCPv6 server provides the same set of features as the DHCPv4 server, and in addition, it includes router advertisements and a
58
+
neat feature which allows naming for clients which use DHCPv4 and stateless autoconfiguration only for IPv6 configuration.
59
+
There is support for doing address allocation (both DHCPv6 and RA) from subnets which are dynamically delegated via DHCPv6 prefix delegation.
0 commit comments