DHCP Relay and Subnet Selection question

Simon Hobson dhcp at thehobsons.co.uk
Tue Mar 28 22:37:38 UTC 2006


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