Move host from one range to another one

Ivan V. Borodin vanchik at yandex.ru
Fri Aug 4 12:32:59 UTC 2006


Dear DHCP-users!

Please, spend a bit of your precious time and look at the config below: 

###########################################

subnet 10.9.96.0 netmask 255.255.224.0 {

        option domain-name-servers 10.9.2.222;
        option domain-name "my.domain.ru";
        option routers 10.9.96.1;
        option subnet-mask 255.255.224.0;
        min-lease-time          2592000;
        default-lease-time      2592000;
        max-lease-time          2592000;

        if (option dhcp-message-type = 1) {
                log(debug, concat("Host with HW addr '", binary-to-ascii(16, 8, ":", suffix(hardware, 6)), "'"));
        }

        class "host0001" {match if option agent.remote-id = 00:14:f8:4a:93:06;}
        class "host0002" {match if option agent.remote-id = 00:13:71:de:a6:70;}
        class "host0003" {match if option agent.remote-id = 00:14:f8:4a:92:ea;}
        class "host0004" {match if option agent.remote-id = 00:14:f8:4a:92:f6;}
        class "host0005" {match if option agent.remote-id = 00:14:f8:4a:92:e6;}
        class "host0006" {match if option agent.remote-id = 00:14:f8:4a:93:02;}
        class "host0007" {match if option agent.remote-id = 00:14:f8:4a:92:f2;}

        pool {allow members of "host0001"; range 10.9.96.2;}
        pool {allow members of "host0002"; range 10.9.96.3;}
        pool {allow members of "host0003"; range 10.9.96.4;}
        pool {allow members of "host0004"; range 10.9.96.5;}
        pool {allow members of "host0005"; range 10.9.96.6;}
        pool {allow members of "host0006"; range 10.9.96.7;}
        pool {allow members of "host0007"; range 10.9.96.8; range 10.9.96.9;}

        pool {
                allow unknown-clients;
                min-lease-time     120;
                default-lease-time 120;
                max-lease-time     120;
                range 10.9.127.1 10.9.127.254;
        }
}

###########################################

The main idea of this config is to provide a fixed IP-address (one or
more - due to customer wish) to the hosts in DOCSIS network regardless
to the PC's HW-address, based only on Cable Modem's MAC-address. The
pool with 'range 10.9.127.1 10.9.127.254;' configured is intended for
some customers who bought just one IP-address but connected two or more
PCs, or for temporarily blocked customers. Presumably, all HTTP requests
(for example) coming from 10.9.127.0/24 are forwarded to "Registration"
server.

Let's examine such situation: some customer's PC got IP from this pool,
then site admin added second 'range' statement into customer's pool. 
How can I make dhcpd to provide new IP (from newly configured range) for
this PC? I found the only way is to manually delete 10.9.127.xxx lease
from dhcpd.leases file and restart dhcpd (regardless to DHCPDRELEASE
made by this PC).

Is there more convenient way to do that?




More information about the dhcp-users mailing list