Move host from one range to another one
dhcp1 at thehobsons.co.uk
Fri Aug 4 19:05:16 UTC 2006
Ivan V. Borodin wrote:
>If this were so simple!
>See: the whole DOCSIS network consist of cable modems and only cable
>modems. All customer's PCs are behind cable modems, so all PCs are
>members of one of defined classes (remote.agent-id is modem's MAC). I
>just want to provide addresses from one segment to registered PCs and
>from another to unregistered (or blocked), and move PC from unreg
>to reg after registration. Both reg-ed and unreg-ed
>are members of same class. I cannot deny it in <temp pool>. And,
>you're right, I'm trying not to track PC's MAC-addr.
>The reason is that dhcpd remembers even released leases, and provide
>it back to the same PC, even if there is a totally unused (newly
>added) IP in the class/pool. Probably there is a way to delete such
>lease? Omshell does not (I got 'not implemented yet' error).
Ahh, I see the problem now !
I cannot see any way around it other than by deleting all leases for
that client in the 'guest' pool. I'm not even sure if that will work
since if the client comes along and asks for the address it last had
(in the guest pool) then it will be given it if it is available (ie
not currently leased to something else).
So, I think that to make your system work you will need to :
- remove all reference to that clients leases in the guest pool.
- create a dummy lease to a non-existant client so that when the real
client comes to renew it's lease, the address will be in use, and so
it cannot retain it.
- possibly create a lease skeleton to make the clients MAC address
'sticky' with the desired new IP address (otherwise it could just get
another address in the guest pool).
Unless you can manage it with omshell, then all will involve stopping
the server and processing the lease database. Alternatively you would
need to edit the server code to provide hooks for the specific
functions you need (delete all leases for address a.b.c.d, create
I assume the clients MAC address does get passed through by the cable
modem and are stored with the leases ? If so then the leases will be
'sticky' once issued, but you will have the same problem every time a
client changes their mac address (swaps out a PC for example).
I believe this is something that would be made easier in a future
release of the server - where it it is planned have reserved leases,
a bit like host statements but more flexible. However, major work on
the current server is being held back while an IP6 implementation is
done, so it might be a while before reserved leases appear.
More information about the dhcp-users