Prefix Delegation and route creation

dhcp-serveripv6isc-dhcproute

I'm using the ISC dhcp server version 4.1 for DHCPv6 prefix delegation on a network. When the server allocates a prefix to a client, the server does not create a route for that prefix to the client that requested the prefix. Here is a feature request for pfsense that describes what I'm trying to accomplish. Short of customizing and rebuilding isc-dhcp (which is an option I'm considering), I haven't been able to determine a method for creating these routes automatically.

I also considered writing a script (perhaps a cron job) to parse the lease file and create routes. The file does not contain sufficient information to create the routes either; it lacks the link-local address or mac address that the prefix was assigned to. This is an excerpt from the lease file. The first 3 and last 3 bytes of the IA-PD appear to be the last three bytes from the requester's mac address encoded in octal.

ia-pd "\236\250\366'\000\001\000\001\031[D\275\010\000'\366\250\236" {
  cltt 1 2013/06/24 18:32:37;
  iaprefix 4001:1234:5678:dff0::/60 {
    binding state active;
    preferred-life 7200;
    max-life 604800;
    ends 1 2013/07/01 18:32:37;
  }
}

Is there an accepted way to create routes from prefix delegation requests? Or, is there another way to obtain the link-local address for a lease?

Other references:

Best Answer

It turns out that the answer to "does the API provide sufficient information to work?" is, as of ISC DHCP 4.3.1, "no, it does not". However, I've just spent a chunk of time putting together a patch set to extend the server to provide (just) enough information to add and remove routes. My changes are available at https://github.com/mpalmer/isc-dhcp, in the client-address-data-expression branch. There's a script in contrib that demonstrates how it can be used.