How to assign staic host entry to one of subnets on shared network?

Constantin Stefanov cstef at parallel.ru
Mon Dec 13 13:04:59 UTC 2010


Glenn Satchell wrote to Users of ISC DHCP <dhcp-users at lists.isc.org>:
> On 12/13/10 21:41, Constantin Stefanov wrote:
>> Hello.
>>
>> I have a shared network with three subnets in it. One of them is for
>> unknown clients, and two are for known clients (one for NATed clients
>> and one for 'real' IP addresses).
>>
>> I have a 'host' entry for every known client. Now I use 'fixed-address'
>> in 'host' entries to point which subnet the clients belongs to. But this
>> means that I should assign IP addresses for subnets manually, resolving
>> conflicts etc.
>>
>> I want to make configuration without 'fixed-address' in 'host' entries.
>> But still I want to have the possibility to point which 'host' entry
>> belongs to which subnet. How can this be done? I can make a pool for
>> each subnet, but how can i match clients to the pool?
>>
> 
> If you create a host entry with no fixed-address then the host will be a
> "known" host, but will get an address dynamically using whatever pools,
> classes and allow/deny you set up.
> 
> In this case one way is create a pool and use "allow known hosts" in it,
> and "deny known hosts" in the others.
This does not fit, I need 2 pools with allow known-clients, my task is
to point which client goes to which pool.

> Another way is to use a class with sub-classes. In this case the host
> statements are not required, unless you match something else on known or
> unknown.

> class "real" {
>   match hardware;
> }
> class "natted" {
>   match hardware;
> }
> subclass "real" 1:x:x:x:x:x:x;
> subclass "natted" 1:y:y:y:y:y:y;
> # repeat subclass as required
>
> subnet a.b.c.d netmask .... {
>   option ...
>   pool {
>     range ...
>     allow members of "real";
>   }
>   pool {
>     range ...
>     allow members of "natted";
>   }
>   pool {
>     range ...
>     deny members of "real";
>     deny members of "natted";
>   }
> }
>

Yes, I have 3rd pool which matches unknown. So my task is: 1 pool for
unknow client and 2 pools for known clients, with possibility to point
the exact pool for every known client.
But as I understand the third pool will get all other clients since
there are 'deny members of ...' statements.

I think it is what I need.

Thank you for help.

-- 
Constantin Stefanov,

Research Computing Center
M.V Lomonosov Moscow State University



More information about the dhcp-users mailing list