[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

dhcp3 reserved addresses aren't completely reserved

I've reserved a handful of IP addresses in the dhcp3 config of a network.

If a machine with a reserved address connects, it gets its address attributed to it with no problems.

However, There are *other* machines that have connected between  the time I configured dhcp3 and the time the reserved machine connects. Oddly, dhcp3 has attributed some of these reserved addresses to other machines.

Then, when a machine with a reservation connects whose address has already been attributed, it gets the reserved address attributed to it all the same, resulting in a conflict.

I include dhcpd.conf and dhcpd.conf.local, below. Please note that I have left only one reservation in the dhcpd.conf.local for the sake of brevity.

Thanks.


# dhcpd.conf:

ddns-update-style interim;
ddns-domainname "somenet.ch";
ddns-rev-domainname "in-addr.arpa.";
ddns-updates on;
update-static-leases on;

option ntp-servers 192.168.16.21;
option netbios-name-servers 192.168.16.21;
option netbios-node-type 8;

include "/etc/dhcp3/rndc.key";
include "/etc/dhcp3/dhcpd.conf.local";

one-lease-per-client on;
option domain-name "somenet.ch";
option domain-name-servers 192.168.16.21, 195.186.4.109;
default-lease-time 14400;
max-lease-time 22000;
authoritative;
log-facility local7;

zone somenet.ch {
        primary 127.0.0.1;
        key rndc-key;
}

zone 16.168.192.in-addr.arpa. {
        primary 127.0.0.1;
        key rndc-key;
}

subnet 192.168.16.0 netmask 255.255.255.0 {
        range dynamic-bootp 192.168.16.101 192.168.16.199;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.16.255;
        # default-lease-time 14400;
        # max-lease-time 14401;
        option routers 192.168.16.1;
        option domain-name-servers 192.168.16.21, 193.246.63.10;
        allow unknown-clients;
}



# dhcpd.conf.local:

    host montpc02 {
        hardware ethernet b8:ac:6f:3f:94:f0;
        fixed-address 192.168.16.102;
    }

Open in new window

0
colliek1
Asked:
colliek1
1 Solution
 
Duncan RoeSoftware DeveloperCommented:
You have defined a range that includes the "reserved" addresses. You must not do that. You need

range dynamic-bootp 192.168.16.103 192.168.16.199;

(this wastes 192.168.16.101 - you could also have if you want range dynamic-bootp 192.168.16.101 192.168.16.101;)

The point is, defining IP addresses that always go to particular MAC addresses does not of itself reserve them - you can only reserve addresses by excluding them from ranges. It then matters little whether you configure a "static" IP address via the MAC or instead you configure the system to have a real static address (i.e. it doesn't used dhcp).
0
 
colliek1Author Commented:
Of course. It should have been obvious to me. Thanks for the clear and concise explanation.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now