Sample Header Ad - 728x90

Dynamic and Static Leases on ISC DHCP

3 votes
1 answer
2740 views
I'm running ISC DHCPd on Raspbian. I want to set up my server so that all addresses in 192.168.0.0/24 are static leases, and all in 192.168.1.0/24 are dynamic leases. I'd like the two to share the 192.168.0.0/23 subnet. **Clarification:** Basically, I want a single DHCP server to handle DHCP for the entire 192.168.0.0/23 subnet. If a device that requests an IP has a host entry defined in dhcpd.conf, it will assign it the IP address that is specified. If it does not, it will assign an address in the range 192.168.1.2 - 192.168.1.254. For simplicity, I have limited all of my static leases to reside in the range 192.168.0.2 - 192.168.0.254. I have my server configured as so: option domain-name "home"; option domain-name-servers 192.168.0.3; default-lease-time 600; max-lease-time 7200; ddns-update-style none; authoritative; host mightyturing{ hardware ethernet 10:bf:48:87:74:a2; fixed-address 192.168.0.64; } host beastnugget{ hardware ethernet 34:e6:d7:52:1e:e4; fixed-address 192.168.0.65; } host ... (about 50 more static leases) subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.0.1; option broadcast-address 192.168.1.255; option domain-name-servers 192.168.0.3, 1.1.1.1; option domain-name "home"; option subnet-mask 255.255.254.0; ddns-updates off; } When I try to start the service it whines: Nov 17 17:45:26 raspberrypi dhcpd: DHCPREQUEST for 192.168.0.64 from 10:bf:48:87:74:a2 via eth0 Nov 17 17:45:26 raspberrypi dhcpd: DHCPACK on 192.168.0.64 to 10:bf:48:87:74:a2 via eth0 Nov 17 17:45:59 raspberrypi dhcpd: Dynamic and static leases present for 192.168.0.64. Nov 17 17:45:59 raspberrypi dhcpd: Remove host declaration mightyturing or remove 192.168.0.64 Nov 17 17:45:59 raspberrypi dhcpd: from the dynamic address pool for 192.168.0.0/23 ... and since my lease pool is 192.168.1.0/24... I'm pretty sure that means that 192.168.0.64 is not in the pool. So why is ISC not recognizing this? Why is it complaining about a range that I have not instructed it to issue dynamic IPs for? **Also:** When I change the range to issue dynamic IPs on the 10.0.0.0/24 range (to test ISC's sanity), but keep the static leases in 192.168.0.0/24, it still complains about 192.168.0.0/23 so what is going on? Where, precisely, did I ask it to hand out 192.168.0.0/23 addresses? option domain-name "home"; option domain-name-servers 192.168.0.3; default-lease-time 600; max-lease-time 7200; ddns-update-style none; authoritative; host mightyturing{ hardware ethernet 10:bf:48:87:74:a2; fixed-address 192.168.0.64; } host beastnugget{ hardware ethernet 34:e6:d7:52:1e:e4; fixed-address 192.168.0.65; } subnet 10.0.0.0 netmask 255.255.255.254 { option routers 10.0.0.1; option broadcast-address 10.0.0.255; option domain-name-servers 1.1.1.1; option domain-name "home"; option subnet-mask 255.255.255.0; ddns-updates off; }
Asked by Chris (574 rep)
Nov 17, 2018, 06:00 PM
Last activity: Jan 10, 2025, 03:36 AM