SV: DHCP Relay and Subnet Selection question

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Mar 29 11:37:55 UTC 2006


>Date: Wed, 29 Mar 2006 09:57:25 +0200
>From: "Lars Jacobsen" <lj at sydfynsel.dk>
>
>Ok, wich range is then preferred of the two ?

Neither is really "preferred". The range of available addresses is
stored in a hash in dhcpd's memory and selected by some hashing
algorithm. Currently that appears to start at the highest address and
going down. But once a few addresses have been handed out it becomes
more along the lines of least recently used, and this leads to a more
random allocation.

>And wich one is then being used if client comes from a GIAddr of X.Y.Z.32 ?

It's a shared network, so if the GIAddr is anywhere on any of the
shared subnets then dhcpd knows it can hand back an address from any of
them.  So in your example a GIAddr of X.Y.Z.32 will be treated the same
as X.Y.Z.1 or say A.B.C.D.99 and will return an address from one of the
subnets in the shared network.

regards,
-glenn

>/Lars
>
>-----Oprindelig meddelelse-----
>Fra: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] På vegne af 
Simon Hobson
>Sendt: 29. marts 2006 00:38
>Til: dhcp-users at isc.org
>Emne: Re: DHCP Relay and Subnet Selection question
>
>Robert Fisher wrote:
>
>>So, my question is -- how can I handle multiple subnets for the CPE
>>group when the giaddr will always be X.Y.Z.1 -- At this point, I'm
>>not particular about which CPEs are assigned an IP Address from the
>>X.Y.Z.0/22 network or say from an A.B.C.0/24 or whatever network as I've
>>not even been tracking CPE MACs.
>>
>>	Is this the sort of situation a shared-network clause would handle and
>>why?
>
>Yes, it is a shared network, so you would use something like :
>
>shared-network cpe {
>   subnet X.Y.Z.0 255.255.252.0 {
>     option routers X.Y.Z.1;
>     option subnet-mask 255.255.252.0;
>     range X.Y.Z.2 X.Y.(Z+3).253;
>   }
>   subnet A.B.C.0 255.255.252.0 {
>     option routers A.B.C.1;
>     option subnet-mask 255.255.252.0;
>     range A.B.C.2 A.B.(C+3).253;
>   }
>}
>
>Why ? Quite simply, this is the construct used to tell the dhcp 
>server that the two networks (X.Y.Z.0 and A.B.C.0) exist on the same 
>physical network. It automatically works out that if it gets a packet 
>with a GIAddr of X.Y.Z.1 then it can give give a client an address 
>from either subnet.



More information about the dhcp-users mailing list