DHCPD is not re-using addresses

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DHCPD is not re-using addresses

CLOSE Dave
The environment here is Fedora 23. One machine acts as DHCP server for
the others (normal, I know). A small portion of each subnet is reserved
for dynamic assignment, devices without reserved addresses.

When I run PXE on a new machine, I see the Anaconda (the Fedora
installer) makes at least three requests for a dynamic address. So far
as I can tell, all of the requests are identical. The sequence is
something like this.

DHCPDISCOVER
DHCPOFFER on 10.76.148.235
DHCPREQUEST for 10.76.148.235
DHCPACK on 10.76.148.235
DHCPDISCOVER
DHCPOFFER on 10.76.148.248
DHCPREQUEST for 10.76.148.248
DHCPACK on 10.76.148.248
DHCPDISCOVER
DHCPOFFER on 10.76.148.249
DHCPREQUEST for 10.76.148.249
DHCPACK on 10.76.148.249
DHCPREQUEST for 10.76.148.248
DHCPACK on 10.76.148.248

Even though all the requests originate from the same MAC address, the
DHCP server gives each request a unique response. As the address leases
take time to expire, I quickly run out of available addresses. Much more
quickly than I should.

I don't recall this happening when doing the same operations on a Fedora
20 base, both DHCP server and PXE installations.
--
Dave Close, Thales Avionics, Irvine California USA.
cell +1 949 394 2124, [hidden email]

"Technology has the shelf life of a banana." - Scott McNealy
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCPD is not re-using addresses

sthaug
> When I run PXE on a new machine, I see the Anaconda (the Fedora
> installer) makes at least three requests for a dynamic address. So far
> as I can tell, all of the requests are identical. The sequence is
> something like this.
>
> DHCPDISCOVER
> DHCPOFFER on 10.76.148.235
> DHCPREQUEST for 10.76.148.235
> DHCPACK on 10.76.148.235
> DHCPDISCOVER
> DHCPOFFER on 10.76.148.248
> DHCPREQUEST for 10.76.148.248
> DHCPACK on 10.76.148.248
> DHCPDISCOVER
> DHCPOFFER on 10.76.148.249
> DHCPREQUEST for 10.76.148.249
> DHCPACK on 10.76.148.249
> DHCPREQUEST for 10.76.148.248
> DHCPACK on 10.76.148.248
>
> Even though all the requests originate from the same MAC address, the
> DHCP server gives each request a unique response. As the address leases
> take time to expire, I quickly run out of available addresses. Much more
> quickly than I should.

Have you checked if the DHCP Discover messages have different client
identifiers? If so, that is your explanation. The client id (if it
exists) is used to decide if this is the same or a new client.

Steinar Haug, Nethelp consulting, [hidden email]
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCPD is not re-using addresses

Bob Proulx
In reply to this post by CLOSE Dave
CLOSE Dave wrote:
> When I run PXE on a new machine, I see the Anaconda (the Fedora
> installer) makes at least three requests for a dynamic address. So far
> as I can tell, all of the requests are identical.
>...
> Even though all the requests originate from the same MAC address, the
> DHCP server gives each request a unique response. As the address leases
> take time to expire, I quickly run out of available addresses. Much more
> quickly than I should.

As Steinar Haug mentioned it is likely that the different clients are
submitting different client ids.  In which case DHCP requires
responding with a different address.

Have you considered using shorter lease times for your volatile
clients?  That way they will expire in a shorter time period and be
available to be reused.  There are likely much better ways to
accomplish this but this is what I do.  It prevents running out of
addresses from the pool when consuming them quickly.  Here I have a
small pool sufficient for me but you might need to decrease times and
a larger pool.  But hopefully it gives you the idea.

class "volatile"  {
  match if substring(option vendor-class-identifier, 0, 3) = "d-i" or
           substring(option vendor-class-identifier, 0, 9) = "PXEClient" or
           substring(option vendor-class-identifier, 0, 9) = "Etherboot" or
           substring(option vendor-class-identifier, 0, 8) = "anaconda" or
           substring(option vendor-class-identifier, 0, 8) = "volatile";
}

subnet 192.168.42.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option routers 192.168.42.1;
  pool {
    failover peer "dhcp-failover-peers";
    range 192.168.42.200 192.168.42.240;
    deny members of "volatile";
    default-lease-time 43200;
    max-lease-time 86400;
  }
  pool {
    failover peer "dhcp-failover-peers";
    range 192.168.42.50 192.168.42.99;
    allow members of "volatile";
    default-lease-time 1800;
    max-lease-time 1800;
  }
}
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users