diff options
| -rw-r--r-- | content/posts/WIP-openbsd-dhcp-server/index.org | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/content/posts/WIP-openbsd-dhcp-server/index.org b/content/posts/WIP-openbsd-dhcp-server/index.org index 3d40a2b..1ebca82 100644 --- a/content/posts/WIP-openbsd-dhcp-server/index.org +++ b/content/posts/WIP-openbsd-dhcp-server/index.org @@ -19,7 +19,7 @@ While I've been an OpenBSD user for years, I'm finally in the process  of replacing the router provided by my ISP with a [[{{< ref "pcengines-comparison" >}}][PC Engines APU2E4]]  running [[{{< ref "installing-openbsd-on-pcengines" >}}][OpenBSD]]. -One of the key services that I have to setup for this is the DHCP +One of the key services that I have to setup for this is the [[https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol][DHCP]]  server, which is responsible for giving out IP addresses to machines  when they join the network. @@ -43,6 +43,9 @@ use =192.168.0.23= as the DNS server, as I have a caching DNS server  which filters out advertisers setup at that address, with =8.8.8.8= as  the secondary DNS server in case my DNS server ever goes down. +I'll also set the default lease time to one week, and the maximum +lease time to one month. +  To jumpstart the configuration, I'll first copy the file from  =/etc/examples/dhcpd.conf= to =/etc/dhcpd.conf= so I don't have to  start from scratch. @@ -123,7 +126,9 @@ range 192.168.0.30 192.168.0.200;  I also specify the default lease time and max lease time. The default  lease time is the number of seconds the DHCP server will hold a lease  for a client if the client doesn't ask for a specific lease length, -and the max lease length is the maximum allowed lease length. +and the max lease length is the maximum allowed lease length. Here I +set the default to 604800 (one week), and the max to 2592000 (one +month).  #+BEGIN_SRC  default-lease-time 604800; @@ -148,3 +153,6 @@ To run the DHCP server, we first enable, then start it using =rcctl=.  doas rcctl enable dhcpd  doas rcctl start dhcpd  #+END_SRC + +To check the leases the =dhcpd= is currently holding, you can check +out =/var/db/dhcpd.leases=. | 
