Network in multiple shared-network instances

Alex Moen alexm at ndtel.com
Wed Apr 15 18:51:51 UTC 2009


Our groups of customers, based on their location on our network, are receiving their addresses via a pool (ok, that's obvious).  We have a situation 
where we need to share a pool between the groups, but yet keep the original groups as well.  The use of this is to set aside a separate pool for 
customers using a static address, either given out from the pool using mac reservations or hardcoded into their equipment, rather than pooled 
addresses that may change over time, and still keep the static addresses in a separate subnet than the regular customer addresses.  The customers on 
the static subnet are on a different vlan in the access equipment.  Unfortunately, the access equipment management address (which is what is used to 
request the address, since the equipment is doing dhcprelay) are on different subnets.

Given the following:
---------snip-------------
shared-network group-1 {
         subnet 10.6.3.0 netmask 255.255.255.0 { }
         subnet 10.0.1.0 netmask 255.255.255.0 {
                 pool {
                         authoritative;
                         allow members of "group1-internet";
                         range 10.0.1.2 10.0.1.200;
                         min-lease-time 129600;
                         max-lease-time 259200;
                         default-lease-time 259200;
                         option subnet-mask 255.255.255.0;
                         option broadcast-address 10.0.1.255;
                         option routers 10.0.1.1;
                 }
         }
}


shared-network group-2 {
         subnet 10.6.4.0 netmask 255.255.255.0 { }
         subnet 10.0.2.0 netmask 255.255.255.0 {
                 pool {
                         authoritative;
                         allow members of "group2-internet";
                         range 10.0.2.2 10.0.2.230;
                         min-lease-time 129600;
                         max-lease-time 259200;
                         default-lease-time 259200;
                         option subnet-mask 255.255.255.0;
                         option broadcast-address 10.0.2.255;
                         option routers 10.0.2.1;
                 }
         }
}
------------snip---------------


Obviously, this does not work:

------------snip---------------
shared-network shared-group-for-static {
         subnet 10.6.3.0 netmask 255.255.0.0 { }
         subnet 10.6.4.0 netmask 255.255.0.0 { }
         subnet 10.0.3.0 netmask 255.255.255.0 {
                 pool {
                         authoritative;
                         range 10.0.3.2 10.0.3.98;
                         min-lease-time 129600;
                         max-lease-time 259200;
                         default-lease-time 259200;
                         option subnet-mask 255.255.255.0;
                         option broadcast-address 10.0.3.255;
                         option routers 10.0.3.1;
                         deny unknown clients;
                         allow members of "shared-pool-for-static";
                         allow known clients;
                 }
         }
}
------------snip---------------

It errors on the duplicated subnets, since the subnet is a member of two shared-network statements.

How is this possible to do, other than combining all of the configurations into one big shared-network statement and making a very difficult config to 
work with?  Why is it a problem for a subnet to reside in more than one shared-network?

Thanks for any ideas and advice!!!  I can really use it!

Alex



More information about the dhcp-users mailing list