Dynamic and Static Leases on ISC DHCP

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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[681]: DHCPREQUEST for 192.168.0.64 from 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:26 raspberrypi dhcpd[681]: DHCPACK on 192.168.0.64 to 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:59 raspberrypi dhcpd[681]: Dynamic and static leases present for 192.168.0.64.
Nov 17 17:45:59 raspberrypi dhcpd[681]: Remove host declaration mightyturing or remove 192.168.0.64
Nov 17 17:45:59 raspberrypi dhcpd[681]: 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;










share|improve this question



















  • 1




    Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
    – Thomas
    Nov 17 at 18:10











  • I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
    – Chris
    Nov 17 at 18:12







  • 1




    Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
    – Thomas
    Nov 17 at 18:14










  • Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
    – Chris
    Nov 17 at 18:17










  • Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
    – Thomas
    Nov 17 at 18:22















up vote
0
down vote

favorite












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[681]: DHCPREQUEST for 192.168.0.64 from 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:26 raspberrypi dhcpd[681]: DHCPACK on 192.168.0.64 to 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:59 raspberrypi dhcpd[681]: Dynamic and static leases present for 192.168.0.64.
Nov 17 17:45:59 raspberrypi dhcpd[681]: Remove host declaration mightyturing or remove 192.168.0.64
Nov 17 17:45:59 raspberrypi dhcpd[681]: 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;










share|improve this question



















  • 1




    Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
    – Thomas
    Nov 17 at 18:10











  • I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
    – Chris
    Nov 17 at 18:12







  • 1




    Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
    – Thomas
    Nov 17 at 18:14










  • Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
    – Chris
    Nov 17 at 18:17










  • Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
    – Thomas
    Nov 17 at 18:22













up vote
0
down vote

favorite









up vote
0
down vote

favorite











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[681]: DHCPREQUEST for 192.168.0.64 from 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:26 raspberrypi dhcpd[681]: DHCPACK on 192.168.0.64 to 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:59 raspberrypi dhcpd[681]: Dynamic and static leases present for 192.168.0.64.
Nov 17 17:45:59 raspberrypi dhcpd[681]: Remove host declaration mightyturing or remove 192.168.0.64
Nov 17 17:45:59 raspberrypi dhcpd[681]: 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;










share|improve this question















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[681]: DHCPREQUEST for 192.168.0.64 from 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:26 raspberrypi dhcpd[681]: DHCPACK on 192.168.0.64 to 10:bf:48:87:74:a2 via eth0
Nov 17 17:45:59 raspberrypi dhcpd[681]: Dynamic and static leases present for 192.168.0.64.
Nov 17 17:45:59 raspberrypi dhcpd[681]: Remove host declaration mightyturing or remove 192.168.0.64
Nov 17 17:45:59 raspberrypi dhcpd[681]: 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;







debian networking raspbian isc-dhcpd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 17 at 18:56









Rui F Ribeiro

38.2k1475123




38.2k1475123










asked Nov 17 at 18:00









Chris

246211




246211







  • 1




    Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
    – Thomas
    Nov 17 at 18:10











  • I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
    – Chris
    Nov 17 at 18:12







  • 1




    Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
    – Thomas
    Nov 17 at 18:14










  • Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
    – Chris
    Nov 17 at 18:17










  • Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
    – Thomas
    Nov 17 at 18:22













  • 1




    Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
    – Thomas
    Nov 17 at 18:10











  • I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
    – Chris
    Nov 17 at 18:12







  • 1




    Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
    – Thomas
    Nov 17 at 18:14










  • Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
    – Chris
    Nov 17 at 18:17










  • Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
    – Thomas
    Nov 17 at 18:22








1




1




Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
– Thomas
Nov 17 at 18:10





Not sure if it is a typo, but you write to have 192.168.0.0/24 and 192.168.1.0/24 networks, but from the config and log files they are /23 and are overlapping. You might want to add the output of ip route of your dhcp server.
– Thomas
Nov 17 at 18:10













I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
– Chris
Nov 17 at 18:12





I want traffic to cross between them, but I want to segregate based on lease type. Hand out static leases on 192.168.0.0/24 and dynamic leases on 192.168.1.0/24 but have them share the 192.168.0.0/23 subnet for routing. Is that not how I have it set up?
– Chris
Nov 17 at 18:12





1




1




Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
– Thomas
Nov 17 at 18:14




Nope, this is not how IP networks work. You have to separate the networks so they do not overlap. Then set up routing between those two subnets.
– Thomas
Nov 17 at 18:14












Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
– Chris
Nov 17 at 18:17




Ok, so if I wanted to reserve part of the 192.168.0.0/24 subnet (say, 192.168.0.16-192.168.0.31) for only static leases and use the rest for dynamic leases, could I do that?
– Chris
Nov 17 at 18:17












Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
– Thomas
Nov 17 at 18:22





Sure, just use range 192.168.0.16 192.168.0.31; in your subnet declaration to limit the dynamic leases, configure your other hosts with the host ... directive and be sure to leave out any other IP addresses that are assigned statically like the IP address of the DHCP server itself.
– Thomas
Nov 17 at 18:22
















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482370%2fdynamic-and-static-leases-on-isc-dhcp%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482370%2fdynamic-and-static-leases-on-isc-dhcp%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?