DHCP concepts
Let's suppose you are in charge of setting up a new small local network with 30 hosts, and let's assume IP version 4 (IPv4) addressing in this example. Now, think how much time setting up the IP address in each host will take. A lot, right? Setting it up in a server or gateway on the network will save a lot of time managing its IP address. So, to solve this problem, we can count on DHCP. OPNsense has a DHCP server that can be configured to deploy IP addresses to the network's hosts. DHCP works in a client/server manner, and it uses the User Datagram Protocol (UDP) to work, specifically on port 67
. We will explore both IPv4 and IPv6 in this chapter. The process of a host taking a DHCP lease, which is how the IP addressing lease is named, is represented in the following diagram:
Next, we'll see how to configure the DHCP service on OPNsense for IPv4 addressing.