DHCP server: how can I guarantee the reserved ip even it's also inside the range

Simon Hobson dhcp at thehobsons.co.uk
Wed Apr 19 11:55:51 UTC 2006


Tian Tian wrote:

>I am the ISC DHCP server user. How can I guarantee the
>reserved ip that can be assigned to the specified host
>anytime even the reserved ip is inside the dynamical
>range?
>
>For example,
>
>=========================================
>subnet 10.0.1.0 netmask 255.255.255.0 {
>     default-lease-time 28800;
>     max-lease-time 28800;
>     option subnet-mask 255.255.255.0;
>     option broadcast-address 10.0.1.255;
>     option routers 10.0.1.1;
>     option domain-name-servers 10.0.1.1;
>     option domain-name "";
>     option netbios-node-type 8;
>     option netbios-name-servers 10.0.1.1;
>     range 10.0.1.10 10.0.1.20;
>
>     host test {
>         hardware ethernet 00:12:3F:1F:2C:31;
>         fixed-address     10.0.1.10;
>     }
>}
>=========================================
>
>The fixed-address (10.0.1.10) is reserved for host
>"test" and it is also inside the dynamic range
>(10.0.1.10 - 10.0.1.20). In this case (I need this
>case), the ip 10.0.1.10 could be assigned to a host
>"somebodyelse" before the host "test" come to request
>a ip.
>
>Plese help me! How can I guarantee the reserved ip
>that will not be assigned to "somebodyelse"?

You cannot do this, it is NOT a valid configuration.

I am curious to know why you feel you need this setup, perhaps if you 
provide more details of what you are trying to achieve then we could 
offer more useful assistance.

Also, to avoid confusion, move your host statements out of the subnet 
declaration, host statements have their own scope which is outside 
the subnet (effectively they are global). Like this :

=========================================
subnet 10.0.1.0 netmask 255.255.255.0 {
     default-lease-time 28800;
     max-lease-time 28800;
     option subnet-mask 255.255.255.0;
     option broadcast-address 10.0.1.255;
     option routers 10.0.1.1;
     option domain-name-servers 10.0.1.1;
     option domain-name "";
     option netbios-node-type 8;
     option netbios-name-servers 10.0.1.1;
     range 10.0.1.10 10.0.1.20;

}

host test {
     hardware ethernet 00:12:3F:1F:2C:31;
     fixed-address     10.0.1.10;
}
=========================================


Simon


More information about the dhcp-users mailing list