Send dhcp-users mailing list submissions to
        [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: forget leases (Sten Carlsen)
   2. Re: forget leases (Simon Hobson)
   3. Re: forget leases (Niall O'Reilly)
   4. Re: forget leases (Glenn Satchell)
   5. Re: forget leases (Simon Hobson)
   6. Re: forget leases (richard lucassen)
   7. Re: forget leases (Mark Sandrock)
   8. Re: forget leases (Shawn Routhier)


----------------------------------------------------------------------

Message: 1
Date: Thu, 23 Jul 2015 14:11:49 +0200
From: Sten Carlsen <[email protected]>
To: [email protected]
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"



On 23/07/15 13:44, richard lucassen wrote:
> On Thu, 23 Jul 2015 09:46:07 +0100
> Simon Hobson <[email protected]> wrote:
>
>>> Goal: I want to have a pool from:
>>>
>>> 192.168.65.128 to 192.168.65.254
>>>
>>> The first host gets 128, the 2nd 129 etc. The max-lease-time is
>>> 300s. I switch off the two hosts. After 10 minutes I take two
>>> different hosts. Now I would like that dhcpd assigns ip 128 and 129
>>> again to the new machines.
>> Config/testing bench ?
> yep
>
>> No, you'd need to do some external work to make that happen. BTW - is
>> the goal that a "new" machine will get .128, or that the "old"
>> machine will get a different address - it makes a difference to ways
>> of achieving it, and one is harder than the other ?
> When using the test network, I'd like to have all hosts start from 128
> (or, as you say from 254, that behaviour changed a few years ago AFAIK)
>
> In fact, it's a /24 network and some hosts regularely come back. The
> problem is now that I always have to nmap the /24 in order to find the
> hosts that populate this network. And as I use clusterssh to manage
> these hosts, each time I need to find out the correct command as
> dhcpd reassigns the ip that it once assigned in the past ;-)
I wonder if "on commit" might be a help?
>
> I was looking for an option "remove-expired-entries-from-leases-file"
> or something like that :)
>
> I agree: I'm terribly lazy :)
>
> R.
>

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20150723/115e7cac/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 23 Jul 2015 13:36:19 +0100
From: Simon Hobson <[email protected]>
To: [email protected]
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

richard lucassen <[email protected]> wrote:

> The
> problem is now that I always have to nmap the /24 in order to find the
> hosts that populate this network. And as I use clusterssh to manage
> these hosts, each time I need to find out the correct command as
> dhcpd reassigns the ip that it once assigned in the past ;-)

A few things that come to mind :

- Write a script that tail the log (or uses on-commit) and shows the IP address 
and what it's been assigned to on a console screen.

- Write (or adapt) a script that parses the leases file and tells you what's 
using what address that you can run as required.

- Write a script that tails the log (or uses on-cmmit) to detect expired leases 
- and use OMAPI to delete the lease, or do a stop-blast-start sequence to clear 
the leases file completely.

- Barcode (if it's not already) the MAC address on each bit of gear. Have a 
scanner that'll read the barcode and assign a fixed address (or let you pick 
one) before quickly re-configuring the DHCP server.

- Hack the code. Remove the code that does all the "least recently used" stuff, 
and simply pick the first address that's not currently in use.



Simon Hobson




------------------------------

Message: 3
Date: Thu, 23 Jul 2015 14:25:09 +0100
From: "Niall O'Reilly" <[email protected]>
To: [email protected]
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Thu, 23 Jul 2015 09:30:56 +0100,
richard lucassen wrote:
> 
> Is it somehow possible to create a pool that "forgets" which ip address
> had been assigned to a particular host once the max-lease-time has
> expired?
> 
> Goal: I want to have a pool from:
> 
> 192.168.65.128 to 192.168.65.254
> 
> The first host gets 128, the 2nd 129 etc. The max-lease-time is 300s. I
> switch off the two hosts. After 10 minutes I take two different hosts.
> Now I would like that dhcpd assigns ip 128 and 129 again to the new
> machines.

  IIUC, your goal is not compatible with the usual reading of the
  following extract from RFC2131.

2.2 Dynamic allocation of network addresses

   The second service provided by DHCP is the allocation of temporary or
   permanent network (IP) addresses to clients.  The basic mechanism for
   the dynamic allocation of network addresses is simple: a client
   requests the use of an address for some period of time.  The
   allocation mechanism (the collection of DHCP servers) guarantees not
   to reallocate that address within the requested time and attempts to
   return the same network address each time the client requests an
   address.

  The second part of the last sentence ("and attempts to return
  the same network address ...") is key.  Until the pool is exhausted,
  the server meets this requirement by leasing a fresh, unused address.


  Best regards,
  Niall O'Reilly
  
  


------------------------------

Message: 4
Date: Thu, 23 Jul 2015 23:39:40 +1000
From: "Glenn Satchell" <[email protected]>
To: "Users of ISC DHCP" <[email protected]>
Subject: Re: forget leases
Message-ID:
        <[email protected]>
Content-Type: text/plain;charset=iso-8859-1

On Thu, July 23, 2015 10:36 pm, Simon Hobson wrote:
> richard lucassen <[email protected]> wrote:
>
>> The
>> problem is now that I always have to nmap the /24 in order to find the
>> hosts that populate this network. And as I use clusterssh to manage
>> these hosts, each time I need to find out the correct command as
>> dhcpd reassigns the ip that it once assigned in the past ;-)
>
> A few things that come to mind :
>
> - Write a script that tail the log (or uses on-commit) and shows the IP
> address and what it's been assigned to on a console screen.
>
> - Write (or adapt) a script that parses the leases file and tells you
> what's using what address that you can run as required.
>
> - Write a script that tails the log (or uses on-cmmit) to detect expired
> leases - and use OMAPI to delete the lease, or do a stop-blast-start
> sequence to clear the leases file completely.
>
> - Barcode (if it's not already) the MAC address on each bit of gear. Have
> a scanner that'll read the barcode and assign a fixed address (or let you
> pick one) before quickly re-configuring the DHCP server.
>
> - Hack the code. Remove the code that does all the "least recently used"
> stuff, and simply pick the first address that's not currently in use.
>
> Simon Hobson

Use DNS and call things by name rather than ip in your scripts.

regards,
-glenn



------------------------------

Message: 5
Date: Thu, 23 Jul 2015 15:20:26 +0100
From: Simon Hobson <[email protected]>
To: Users of ISC DHCP <[email protected]>
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Niall O'Reilly <[email protected]> wrote:

>  The second part of the last sentence ("and attempts to return
>  the same network address ...") is key.  Until the pool is exhausted,
>  the server meets this requirement by leasing a fresh, unused address.


While that is true, I think this situation is an example where that isn't 
actually the desired operation.


Glenn Satchell <[email protected]> wrote:

> Use DNS and call things by name rather than ip in your scripts.

That may work if your devices all provide a known and reliable host name - 
otherwise, how do you configure the DNS and/or find out what names to use ?



------------------------------

Message: 6
Date: Thu, 23 Jul 2015 16:59:38 +0200
From: richard lucassen <[email protected]>
To: [email protected]
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Thu, 23 Jul 2015 14:11:49 +0200
Sten Carlsen <[email protected]> wrote:

> I wonder if "on commit" might be a help?
> >
> > I was looking for an option
> > "remove-expired-entries-from-leases-file" or something like that :)

Ok, thnx everyone, I'll write a nice shell script that parses the leases
file and outputs a "cssh -l root <host> <host>" command. Unfortunately
it is not possible using a "pool" config. No problem, it's stated
clearly in RFC as pointed out.

R. 

-- 
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
+------------------------------------------------------------------+


------------------------------

Message: 7
Date: Thu, 23 Jul 2015 10:15:43 -0500
From: Mark Sandrock <[email protected]>
To: Users of ISC DHCP <[email protected]>
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

In the Infoblox product, which is based on
ISC DHCP, expired leases can be scavenged,
after a specified time has elapsed.

Setting scavenging to be done immediately
would seem compatible with what the OP
is wanting.

I have no connection with Infoblox other
than working with their DDI product, and
hope it's okay to mention them.

Mark

> On Jul 23, 2015, at 8:25 AM, Niall O'Reilly <[email protected]> wrote:
> 
> On Thu, 23 Jul 2015 09:30:56 +0100,
> richard lucassen wrote:
>> 
>> Is it somehow possible to create a pool that "forgets" which ip address
>> had been assigned to a particular host once the max-lease-time has
>> expired?
>> 
>> Goal: I want to have a pool from:
>> 
>> 192.168.65.128 to 192.168.65.254
>> 
>> The first host gets 128, the 2nd 129 etc. The max-lease-time is 300s. I
>> switch off the two hosts. After 10 minutes I take two different hosts.
>> Now I would like that dhcpd assigns ip 128 and 129 again to the new
>> machines.
> 
>  IIUC, your goal is not compatible with the usual reading of the
>  following extract from RFC2131.
> 
> 2.2 Dynamic allocation of network addresses
> 
>   The second service provided by DHCP is the allocation of temporary or
>   permanent network (IP) addresses to clients.  The basic mechanism for
>   the dynamic allocation of network addresses is simple: a client
>   requests the use of an address for some period of time.  The
>   allocation mechanism (the collection of DHCP servers) guarantees not
>   to reallocate that address within the requested time and attempts to
>   return the same network address each time the client requests an
>   address.
> 
>  The second part of the last sentence ("and attempts to return
>  the same network address ...") is key.  Until the pool is exhausted,
>  the server meets this requirement by leasing a fresh, unused address.
> 
> 
>  Best regards,
>  Niall O'Reilly
> 
> 
> _______________________________________________
> dhcp-users mailing list
> [email protected]
> https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

Message: 8
Date: Thu, 23 Jul 2015 08:28:51 -0700
From: Shawn Routhier <[email protected]>
To: [email protected]
Subject: Re: forget leases
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


> On Jul 23, 2015, at 7:59 AM, richard lucassen <[email protected]> 
> wrote:
> 
> On Thu, 23 Jul 2015 14:11:49 +0200
> Sten Carlsen <[email protected]> wrote:
> 
>> I wonder if "on commit" might be a help?
>>> 
>>> I was looking for an option
>>> "remove-expired-entries-from-leases-file" or something like that :)
> 
> Ok, thnx everyone, I'll write a nice shell script that parses the leases
> file and outputs a "cssh -l root <host> <host>" command. Unfortunately
> it is not possible using a "pool" config. No problem, it's stated
> clearly in RFC as pointed out.
> 
> R. 

You may want to look at the script in
DHCP/contrib/dhcp-lease-list.pl
it provides a perl script to do some things to the lease file.

It probably won?t be exactly what you want but it may provide a
starting point.

Shawn



------------------------------

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

End of dhcp-users Digest, Vol 81, Issue 26
******************************************

Reply via email to