On Mon, Apr 10, 2023 at 08:14:49AM -0700, Jillian Alana Bolton wrote: > On Mon, Apr 10, 2023 at 09:17:01AM +0200, Otto Moerbeek wrote: > > On Thu, Apr 06, 2023 at 12:13:50PM -0700, Jillian Alana Bolton wrote: > > > > > > > > >Synopsis: dhcpd(8) does not offer fixed addresses > > > >Category: user > > > >Environment: > > > System : OpenBSD 7.2 > > > Details : OpenBSD 7.2 (GENERIC) #728: Tue Sep 27 11:49:18 MDT 2022 > > > > > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC > > > > > > Architecture: OpenBSD.amd64 > > > Machine : amd64 > > > >Description: > > > I want to offer fixed addresses to some clients in an otherwise > > > dynamically assigned network. I tried Following the example at > > > https://www.openbsd.org/faq/pf/example1.html#dhcp and the expected > > > behavior is that the client with MAC address 52:54:00:84:7f:c9 > > > would receive a DHCPOFFER for address 191.168.101.21. Instead, > > > the DHCPOFFER specifies 192.168.101.128. > > > > > > If I remove the 'range' declaration, the client received no > > > DHCPOFFER. > > > >How-To-Repeat: > > > pwt01-gw1# cat /etc/dhcpd.conf # THIS IS THE SERVER > > > subnet 192.168.101.0 netmask 255.255.255.0 { > > > range 192.168.101.128 192.168.101.196; > > > host pwt01-web01 { > > > fixed-address 191.168.101.20; > > > hardware ethernet 52:54:00:6b:b4:3e; > > > } > > > host pwt01-web02 { > > > fixed-address 191.168.101.21; > > > hardware ethernet 52:54:00:84:7f:c9; > > > } > > > } > > > > > > pwt01-web02# ifconfig vio0 # THIS IS THE CLIENT > > > vio0: flags=808843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4> > > > mtu 1500 > > > lladdr 52:54:00:84:7f:c9 > > > index 1 priority 0 llprio 3 > > > groups: egress > > > media: Ethernet autoselect > > > status: active > > > pwt01-web02# dhcpleasectl vio0 > > > . > > > vio0 [Bound] > > > inet 192.168.101.128 netmask 255.255.255.0 > > > lease 12 hours > > > dhcp server 192.168.101.2 > > > pwt01-web02# > > > > > > >Fix: > > > <how to correct or work around the problem, if known (multiple lines)> > > > > This is likely not a bug. You config looks OK and I have been using a > > very similar config for years. > > > > Some questions: > > > > - Did you restart dhcpd? > > - Show the logs of a lease request by pwt01-web02 > > > > -Otto > > I found the cause late last night! I have an off-by-one > error in the first octet of my fixed-address declarations. > > > > subnet 192.168.101.0 netmask 255.255.255.0 { > > > range 192.168.101.128 192.168.101.196; > > > host pwt01-web01 { > > > fixed-address 191.168.101.20; > ^^^ > > > hardware ethernet 52:54:00:6b:b4:3e; > > > } > > > host pwt01-web02 { > > > fixed-address 191.168.101.21; > ^^^ > > > hardware ethernet 52:54:00:84:7f:c9; > > > } > > > } > > I did restart dhcpd with: rcctl restart dhcpd > > If you still want the logs, do you mean from rsyslogd(8) > or something like tcpdump(8)? > > Jillian
/var/log/daemon -Otto