DHCP server offers same lease regardless of changed option

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

DHCP server offers same lease regardless of changed option

ksladic
Hi.

I have a question regarding valid leases.
Let's say DHCP server is configured with a host entry using a custom DHCP option with some predefined value, like:

host host1 {
   hardware ethernet 00:01:02:03:04:05;
   option my-net-opt "host1_net_opt"; }

After host1 gets this lease and recognizes the option the lease is valid for (let's say) 10 days.

Now I reconfigure DHCP server by changing option value for that host, like:

host host1 {
   hardware ethernet 00:01:02:03:04:05;
   option my-net-opt "host1_net_opt_new"; }

and restart the DHCP server.

What I am experiencing is that if host1 requests a new lease (after restart or renew) while the old one is still valid, it gets the same old lease with the old option value.

My questions are:
1. Is this expected behaviour or am I doing something wrong?
2. If this is how it works is there a way to somehow invalidate that old lease to force the server to create a new one with a new option value?

Thank you very much.
Any help would be highly appreciated.

RegK

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

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

Re: DHCP server offers same lease regardless of changed option

Simon Hobson
Klemen Sladic <[hidden email]> wrote:

> I have a question regarding valid leases.
> Let's say DHCP server is configured with a host entry using a custom DHCP option with some predefined value, like:
>
> host host1 {
>    hardware ethernet 00:01:02:03:04:05;
>    option my-net-opt "host1_net_opt"; }
>
> After host1 gets this lease and recognizes the option the lease is valid for (let's say) 10 days.
>
> Now I reconfigure DHCP server by changing option value for that host, like:
>
> host host1 {
>    hardware ethernet 00:01:02:03:04:05;
>    option my-net-opt "host1_net_opt_new"; }
>
> and restart the DHCP server.
>
> What I am experiencing is that if host1 requests a new lease (after restart or renew) while the old one is still valid, it gets the same old lease with the old option value.
>
> My questions are:
> 1. Is this expected behaviour or am I doing something wrong?
> 2. If this is how it works is there a way to somehow invalidate that old lease to force the server to create a new one with a new option value?

How did you determine that the changed information isn't sent ? By looking at the client's UI, or by looking at packets on the wire ?
For some clients, changes in options don't get actioned until a lease actually expires (or other combinations). Thus the server may update information, but the client not act on it.

So if you haven't done so already, use a packet sniffer and check what is actually sent on the wire.

If the server is still sending the old option value, then I'd look in the leases file to see what it is holding - note that it's an "append only" database, if there's more than one entry for the address then look at the last one in the file.

Simon

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users