Assigning a different gateway address based on gi-addr

Nicolas De Cristofaro nicolas.de.cristofaro at ericsson.com
Fri Oct 29 19:25:04 UTC 2010


Hello,

We are attempting a configuration with our ISC DHCP server where we would like to hand out a different gateway address based on the gi-addr of the dhcp-relay set by our routers.

Our solution includes two routers and one is acting as a standy-node only, so subscribers would only connect via this node if the primary node fail. Our configuration does not allow us to use VRRP due to limitations with the box, and we would like to use a different gateway address based on if the subscribers connected via the primary dhcp-relay or the back dhcp-relay.

We would like to share the same pool definition though, and this is where we've ran into problems, we can't use the same 'range' in two pools. So the idea would be to use one pool, but assign a different 'options router' based on the class matching, is this possible?

Here is what we have so far based on what I found already reading through the mailing lists:

subnet 88.88.88.32 netmask 255.255.255.240 {
    default-lease-time 14400;
    max-lease-time 14400;

    class "NODE-1" {
      match if binary-to-ascii(10, 8, ".", packet(24, 4)) = "88.88.88.33";
    }

    class "NODE-2" {
      match if binary-to-ascii(10, 8, ".", packet(24, 4)) = "88.88.88.34";
    }
     pool {

      option routers 88.88.88.33

      failover peer "dhcp-failover";

      deny dynamic bootp clients;

      range 88.88.88.35 88.88.88.45;

      allow members of "NODE-1";
      }

    pool {

      option routers 88.88.88.34

      failover peer "dhcp-failover";

      deny dynamic bootp clients;

      range 88.88.88.35 88.88.88.45;

      allow members of "NODE-2";
    }
  }

Based on that config, the system doesn't like using two pools with overlapping ranges, so we'd have to find another solution. Also I'm not sure if the match packet (24,4) has the correct syntax, I've tried already converting it to hex but it didn't like it either, this was the only syntax that worked so far.
Any suggestions?
Thanks!
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20101029/3b6ac785/attachment.html>


More information about the dhcp-users mailing list