Move host from one range to another one

Ivan V. Borodin vanchik at yandex.ru
Fri Aug 4 16:37:16 UTC 2006


Привет, Simon,

Я отвечаю на Ваше письмо от 4 августа 2006 г., 19:37:26

SH> Ivan V. Borodin wrote:

>>  > OK, I think what you are asking is :
>>>
>>>  If you have :
>>>
>>>           pool {allow members of "host0001"; range 10.9.96.2;}
>>>
>>>  then change it to :
>>>
>>>           pool {allow members of "host0001"; range 10.9.96.2; range 
>>>10.9.96.19;}
>>>
>>>  can you make a device which already has 10.9.96.2 change to 10.9.96.19 ?
>>>
>>>
>>>  If that is what you want, then you would need to deny the client from
>>>  using 10.9.96.2 so that it will be offered a different address -
>>>  otherwise it will continue to be offered 10.9.96.2.
>>>
>>>  You could do this by :
>>>
>>>           pool {deny booting; range 10.9.96.2;}
>>  >          pool {allow members of "host0001"; range 10.9.96.19;}
>>>
>>>  Next time the client tries to renew it's lease on 10.9.96.2, the
>>>  server will respond with DHCPNAK. This will cause the client to stop
>>>  using the lease and request a new one, at which point the server can
>>>  offer it 10.9.96.19.
>>>
>>>  Simon
>>>
>>
>>
>>
>>
>>Please, let me explain step-by-step:
>>
>>1. there is:
>>
>>pool {allow members of "host0001"; range 10.9.96.2;}
>>pool { <temporary pool> }
>>
>>one customer has two PCs - first PC has IP 10.9.96.2, second - some IP
>>from temp pool.
>>
>>2. Admin do this:
>>
>>pool {allow members of "host0001"; range 10.9.96.2; range 10.9.96.100;}
>>pool { <temporary pool> }
>>
>>Customer still have two PCs. I want to move second customer's PC from
>><temporary pool>-address to 10.9.96.100 automatically.


SH> OK, same principals apply. You must make it so that the client is no 
SH> longer allowed to have an address from this pool, which you can do 
SH> two ways :

SH>          pool {
SH>                  deny members of "host0001";
SH>                  deny members of "host0002";
SH>                  deny members of "host0003";
SH>                  deny members of "host0004";
SH>                   ...
SH>                  min-lease-time     120;
SH>                  default-lease-time 120;
SH>                  max-lease-time     120;
SH>                  range 10.9.127.1 10.9.127.254;
SH>          }

SH> or, you can make the host 'known' by adding a host statement for it :

SH>          pool {
SH>                  deny known-clients;
SH>                   ...
SH>                  min-lease-time     120;
SH>                  default-lease-time 120;
SH>                  max-lease-time     120;
SH>                  range 10.9.127.1 10.9.127.254;
SH>          }
SH>          host "host0001" { hardware ethernet aa:bb:cc:dd:ee:ff; }
SH>          host "host0002" { ....

SH> Since you are not tracking clients mac addresses then the first way 
SH> is probably easier.

SH> Simon

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).

-- 
Всего наилучшего,
 Ivan                     mailto:vanchik at yandex.ru



More information about the dhcp-users mailing list