block / exclude or deny single IP addresses from being handed out

Glenn Satchell Glenn.Satchell at uniq.com.au
Tue Feb 17 14:30:02 UTC 2009


>Date: Mon, 16 Feb 2009 16:11:01 +1100
>Subject: block / exclude or deny single IP addresses from being handed out
>From: Chris Henderson <henders254 at gmail.com>
>To: dhcp-users at isc.org
>X-Mailman-Approved-At: Tue, 17 Feb 2009 13:39:04 +0000
>X-BeenThere: dhcp-users at lists.isc.org
>
>My DHCP server (v 3.0.6) has an include file which is dynamically
>generated by a script. However, I would like to exclude some single
>IPs from the /etc/dhcpd.conf file so that they are never being handed
>out to the clients. These IPs are: 192.168.1.25, 192.168.2.25,
>192.168.3.25, 192.168.4.25.
>
>Does anyone know how to do that?
>
>Thanks.

There's a couple of steps, first exclude them from the range, eg if the
original range for the first network was 192.168.1.20 to 192.168.1.250,
then you need to replace the range statement with two statements that
cover the part of the range below 25, and above 25, eg:

subnet 192.168.1.0 netmask 255.255.255.0 {
  # range 192.168.1.10 192.168.1.250;
  range 192.168.1.10 192.168.1.24;
  range 192.168.1.26 192.168.1.250;
}

It may be that you don't need the first part (below .25) so you may be
able to get away with only the one range statement. ISC dhcpd best
practise seems to be to group all your fixed address hosts either at
the low or high end of each subnet so you do not need to use multiple
split range statements.

regards,
-glenn




More information about the dhcp-users mailing list