Multiple subnets within on large CIDR

Simon Hobson dhcp1 at
Tue Nov 4 20:14:20 UTC 2008

Justin Shore wrote:

>Scaling back the /19 and /22 a little bit, pretend that I have a /22 
>and 4 carriers.  Each carrier is assigned a /24 under that /22 and 
>the devices in each carrier uses a /24 mask.
>	/22
>	/24	Carrier 1
>	/24	Carrier 2
>	/24	Carrier 3
>	/24	Carrier 4
>The single SVI on each router has 0.1, 1.1, 2.1 and 3.1 configured 
>for use (HSRP).  0.1 is the primary and all the rest are secondaries.
>The problem as I see it now is that when my routers receive the 
>DISCOVER on the SVI with the /19 GW IP and all the /22 secondaries, 
>it will only use the primary IP for the IP address of the relaying 
>router.  This means that I won't be able to correctly match the 
>subnet statements that correspond to the /22s.  I have to have 
>unique subnet statements for each /22 because the default route is 
>different for each /22 (unless I can define the router option in a 
>pool statement).

Just put the four subnets in a shared network :

shared-network fibre {
   subnet ...
   subnet ...
   subnet ...
   subnet ...

The DHCP server will now know that when it receives a packet relayed 
by, the client is on a network where all of those subnets 
are valid - that is the function of the shared-network declaration.

I would say you need to delete the subnet, otherwise you 
have overlapping subnets (even if they are the same) which is not 

You need to provide your own mechanism to determine which pool a 
client gets an address from - but you say you are going to do that by 
option-82, so that's dealt with. Without such an assignment, then 
allocation of client to subnet is arbitrary, though in practice there 
is an undocumented, implementation specific, liable to change without 
notice, order in which previously unused addresses will be allocated.

If you don't want to tie a router to a specific subnet, you may 
choose to put the routers etc on a separate (possibly RFC1918 routed 
only within your plant) management subnet. In that case, you would 
want to include that subnet in the shared subnet declaration, but 
just don't declare a pool within it. I know that two of the network 
providers we deal with at work do this - they have their own routers 
on RFC1918 addresses routed only from their own management systems.

Simon Hobson

Visit for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the dhcp-users mailing list