Is there a way to exclude an ip address from dhcp pool? For various reasons i have a machine that I can't reconfigure or move off the network (lets call it a printer). It has been hard coded an x.x.x.50 address and my dhcp pool is x.x.x.10 -> x.x.x.246. I don't want to have 2 pool definitions for this one subnet to cover each side of this machine. Is there some form of 'exclude ip' argument/option? I'm using ubuntu 11 and the isc-dhcp package.

DISCLAIMER: i have googled and it only came up with IoS and juniper info.


Why don't you set the IP for that appliance explicitely:

# The standard subnet
subnet netmask {
    option domain-name "ourdomain.internal";
    option routers;
    option domain-name-servers;

#has hardcoded ip, and dhcp should not use that in pool
host fixedipappliance {
    hardware ethernet 10:4e:ed:co:ff:ee;

I just successfully testet a configuration with two ranges like that. Multiple range statement are legal, as mentioned in the manpage:

The range statement

  range [ dynamic-bootp ] low-address [ high-address];

For any subnet on which addresses will be assigned dynamically, there must be at least one range statement. The range statement gives the lowest and highest IP addresses in a range. All IP addresses in the range should be in the subnet in which the range statement is declared. The dynamic-bootp flag may be specified if addresses in the specified range may be dynamically assigned to BOOTP clients as well as DHCP clients. When specifying a single address, high-address can be omit‐ ted.

  • 1
    ah-ha i didn't realise that you could provide 2 range options like. Jul 13 '11 at 10:56

I think you want to do static DHCP assignment. See if this help. http://www.miquels.cistron.nl/isc-dhcpd/ http://forums.whirlpool.net.au/archive/309440


You shouldn't need to worry about it - the DHCP server will check whether the address exists on the network before allocating it. Do man dhcpd.conf and look at the IP Address Conflict Prevention section. Provided the device will respond to an ICMP Echo Request, you don't need to do anything.

Note: A conflict may arise if a device gets the IP address via DHCP initially, followed by the static address being allocated.

  • If the device has a fixed IP configured internally and is present on the network, even without a fixed address or split range configured the DHCP server will mark the address as "abandoned" when the initial ICMP Echo Request message shows the device is online. The server will only try to reuse the address after the pool becomes exhausted, and will still check whether the device is online first. The only way a conflict can occur is if the server allocates the address while the device is offline. No changes are needed to dhcpd.conf to support this, it is standard functionality.
    – Mike Insch
    Jul 13 '11 at 11:31
  • 2
    The ISC server (what most linux distributions use) checks IP address use by pinging them. Beware things like Windows workstations which do not respond to pings by default, something which leads to address use collisions. Jul 14 '11 at 15:01
  • Except when you reboot your printer, there's a chance you could get the address taken by something else. No, it best to exclude it from the range DHCP will dish out.
    – hookenz
    Jan 25 '13 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.