How to create a backup pool?

Jukka Laaksola jukka.laaksola at netland.fi
Tue Jul 18 08:56:48 UTC 2006


Hello!

I have set up a quite complex class/subclass configuration for ISC
dhcpd. It uses Option-82 information to connect some DSLAMs to several
pools etc.

Now the question is if there is an easy way to add a priority to pools?
The idea is to add a backup pool with private IPs which will be NATted.

So normally I would share public IPs from pool A to customers but if all
public IPs are in use then next customers will get private IPs
(10.10.10.x) from a backup pool. All of those private IPs are NATted to
one public IP.

The configuration should give first all public IPs and after that start
to give IPs from private IPs. Is this possible somehow?

Same as pseudo configuration:
----8<----
class "DSLAM1" {
   match if substring (option agent.circuit-id, 4, 255) = "DSLAM1";
   spawn with binary-to-ascii (10, 16, "",
                substring ( option agent.circuit-id, 0, 2));
   lease limit 5;
}

shared-network the-network {
   default-lease-time 3600;
   max-lease-time 7200;
   min-lease-time 600;
   set circuit-id = option agent.circuit-id;
   set remote-id = option agent.remote-id;
   option domain-name "example.com";
   option domain-name-servers xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy;

   # Public IPs
   #
   # These are normally used.
   subnet xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy {
     option routers xxx.xxx.xxx.xxx;
     option broadcast-address yyy.yyy.yyy.yyy;

     pool {
       range xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy;
       allow members of "DSLAM1";
       priority 1;
     }
   }

   # Private IPs
   #
   # These are used only if all public IPs above are in use.
   subnet 10.10.10.0 netmask 255.255.255.0 {
     option routers 10.10.10.1;
     option broadcast-address 10.10.10.255;

     pool {
       range 10.10.10.10 10.10.10.254;
       allow members of "DSLAM1";
       priority 2;
     }
   }

}
----8<----


-- 
Jukka Laaksola
Netland Oy



More information about the dhcp-users mailing list