Move host from one range to another one

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Aug 4 15:37:26 UTC 2006


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.


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

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

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

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

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

Simon


More information about the dhcp-users mailing list