Match dhcp6.remote-id to CLASS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Match dhcp6.remote-id to CLASS

Jose Jr. Catubigan
Hi,

We want to match option dhcp6.remote-id to CLASS. Below are our not working configuration.
CPE gets the ip from fallback pool.

-----------------------------------------------------------------------------------------------------------
authoritative;
log-facility local6;

log (info, concat("CPE Normal Lease: ", binary-to-ascii(16,16,":",substring(option dhcp6.ia-na, 16, 16))));

# IPv6 CPE Class
class "CPE.v6" {match option dhcp6.remote-id;}

subclass "CPE.v6" 08:80:39:AC:C9:C0;

shared-network lab-cpe {
        subnet6 2001:d800:4010::/48 {
                deny unknown-clients;
                option dhcp6.name-servers 2001:d800:1000:1::2;
                default-lease-time 3600;
                max-lease-time 3600;
                        # CPE.v6
                        pool6 {
                                range6 2001:d800:4010::2 2001:d800:4010::10;
                                allow members of "CPE.v6";
                        }

                        # Fallback pool
                        pool6 {
                                range6 2001:d800:4010::11 2404:3c00:4010::20;
                        }
-----------------------------------------------------------------------------------------------------------

Thanks in advance,
--joecat--

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Match dhcp6.remote-id to CLASS

Bob Harold

On Wed, Jul 5, 2017 at 9:50 PM, Jose Jr. Catubigan <[hidden email]> wrote:
Hi,

We want to match option dhcp6.remote-id to CLASS. Below are our not working configuration.
CPE gets the ip from fallback pool.

-----------------------------------------------------------------------------------------------------------
authoritative;
log-facility local6;

log (info, concat("CPE Normal Lease: ", binary-to-ascii(16,16,":",substring(option dhcp6.ia-na, 16, 16))));

# IPv6 CPE Class
class "CPE.v6" {match option dhcp6.remote-id;}

subclass "CPE.v6" 08:80:39:AC:C9:C0;

shared-network lab-cpe {
        subnet6 2001:d800:4010::/48 {
                deny unknown-clients;
                option dhcp6.name-servers 2001:d800:1000:1::2;
                default-lease-time 3600;
                max-lease-time 3600;
                        # CPE.v6
                        pool6 {
                                range6 2001:d800:4010::2 2001:d800:4010::10;
                                allow members of "CPE.v6";
                        }

                        # Fallback pool
                        pool6 {
                                range6 2001:d800:4010::11 2404:3c00:4010::20;
                        }
-----------------------------------------------------------------------------------------------------------

Thanks in advance,
--joecat--

I am pretty sure that once the client gets an IP from the 'fallback' pool, both the server and client will continue to use that IP even if the CPE pool matches.  I think you need to add to the second pool:
      deny members of " CPE.v6";
You could instead try to remove (or block with a DHCP reserved) any IP the client got previously, but that probably won't be enough.

That breaks the "failover" idea, but DHCP really does not have that concept.  It considers all pools "equally", although it usually fills the first before starting the next.

-- 
Bob Harold


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Match dhcp6.remote-id to CLASS

Jose Jr. Catubigan
In reply to this post by Jose Jr. Catubigan
Hi All,

Manage to match the remote-id using Vendor Specific Information Option.

see below the working config.

---------------------------------------------------------------------------------------------------------

authoritative;

log-facility local6;


# Declare the option space.

  option space docsis code width 2 length width 2 hash size 100;


# Define DOCSIS option formats.

  option docsis.tftp-servers code 32 = array of ip6-address;

  option docsis.cablelabs-configuration-file code 33 = text;

  option docsis.cablelabs-syslog-servers code 34 = array of ip6-address;

  option docsis.device-id code 36 = string;

  option docsis.cm-mac-address code 1026 = string;


# Anchor the docsis option space under the VSIO option.

  option vsio.docsis code 4491 = encapsulate docsis;


log (info, concat("Cable Modem Mac: ", v6relay(1, (binary-to-ascii(16, 8, ":", option docsis.cm-mac-address)))));

log (info, concat("Normal Lease: ", binary-to-ascii(16,16,":",substring(option dhcp6.ia-na, 16, 16))));


# IPv6 CPE Class

class "CPE.v6" {match v6relay(1, option docsis.cm-mac-address);}


subclass "CPE.v6" 08:80:39:AC:C9:C0;


shared-network lab-cpe {

        subnet6 2001:d800:4010::/48 {

                deny unknown-clients;

                option dhcp6.name-servers 2001:d800:1000:1::2;

                default-lease-time 3600;

                max-lease-time 3600;

                        # CPE.v6

                        pool6 {

                                range6 2001:d800:4010::2 2001:d800:4010::10;

                                allow members of "CPE.v6";

                        }


                        # Fallback pool

                        pool6 {

                                range6 2001:d800:4010::11 2404:3c00:4010::20;

                        }

}

}

---------------------------------------------------------------------------------------------------------

Regards,
--joecat--

On Thu, Jul 6, 2017 at 9:50 AM, Jose Jr. Catubigan <[hidden email]> wrote:
Hi,

We want to match option dhcp6.remote-id to CLASS. Below are our not working configuration.
CPE gets the ip from fallback pool.

-----------------------------------------------------------------------------------------------------------
authoritative;
log-facility local6;

log (info, concat("CPE Normal Lease: ", binary-to-ascii(16,16,":",substring(option dhcp6.ia-na, 16, 16))));

# IPv6 CPE Class
class "CPE.v6" {match option dhcp6.remote-id;}

subclass "CPE.v6" 08:80:39:AC:C9:C0;

shared-network lab-cpe {
        subnet6 2001:d800:4010::/48 {
                deny unknown-clients;
                option dhcp6.name-servers 2001:d800:1000:1::2;
                default-lease-time 3600;
                max-lease-time 3600;
                        # CPE.v6
                        pool6 {
                                range6 2001:d800:4010::2 2001:d800:4010::10;
                                allow members of "CPE.v6";
                        }

                        # Fallback pool
                        pool6 {
                                range6 2001:d800:4010::11 2404:3c00:4010::20;
                        }
-----------------------------------------------------------------------------------------------------------

Thanks in advance,
--joecat--


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Loading...