# DHCP Server Configuration file for route mode CMTS

#


#omapi-port 7911;

#key omapi_key {

#algorithm HMAC-MD5;

#secret "UKQ0oBMb9402pQfh2714gRQIsvi2xsXQpI9r4xmlJDdPe4oSUDOM+NL3YYDTvC3dNGPSKM2NtJ7JeUxQnxNw2w=="; #<-The output from #the generated key above.

#};

#omapi-key omapi_key;


authoritative;

option domain-name "nofrmann.at";

option domain-name-servers 8.8.8.8,8.8.4.4;

option time-servers 192.53.103.108;

option log-servers 192.53.103.108;

option tftp-server-name "172.22.0.13";

ddns-updates off;

ddns-update-style none;

ignore client-updates;

min-lease-time 3600;

default-lease-time 3600;

max-lease-time 3600;

log-facility local6;

option wpad code 252 = text;

deny client-updates;




option host-name = "cloud";

option space vsi;

option vsi.version code 6 = string;

option vsi.model code 9 = string;

option vsi.model_other code 201 = string;

option vsi.version_other code 202 = string;

option vsi-pkt code 43 = encapsulate vsi;


# Define option 122

option space docsis-mta;

option docsis-mta.dhcp-server-1 code 1 = ip-address;

option docsis-mta.dhcp-server-2 code 2 = ip-address;

option docsis-mta.provision-server code 3 = { integer 8, string };

option docsis-mta.as-req-as-rep-1 code 4 = { integer 32, integer 32, integer 32 };

option docsis-mta.as-req-as-rep-2 code 5 = { integer 32, integer 32, integer 32 };

option docsis-mta.krb-realm-name code 6 = string;

option docsis-mta.tgs-util code 7 = integer 8;

option docsis-mta.timer code 8 = integer 8;

option docsis-mta.ticket-ctrl-mask code 9 = integer 16;

option docsis-mta-pkt code 122 = encapsulate docsis-mta;


# Globally set option 122 settings just in case

option docsis-mta.dhcp-server-1 172.22.0.13;

#option docsis-mta.dhcp-server-1 0.0.0.0;

option docsis-mta.provision-server 0 "\003172\00222\0010\00213\000";

#option docsis-mta.provision-server 0 "\005cloud\007normann\002at\000";

option docsis-mta.krb-realm-name "\005BASIC\0011\000";



#Define option 43

option space vendorOptions;

option vendorOptions.deviceType code 2 = string;

option vendorOptions.serialNumber code 4 = string;

option vendorOptions.hardwareVersion code 5 = string;

option vendorOptions.softwareVersion code 6 = string;

option vendorOptions.bootRomVersion code 7 = string;

option vendorOptions.oui code 8 = string;

option vendorOptions.modelNumber code 9 = string;

option vendorOptions.docsisVendor code 10 = string;

#option vendorOptions.docsisVendor.version_other code 202 = string;

option vendorOptions-pkt code 43 = encapsulate vendorOptions;


stash-agent-options true;


option space myagent;

option myagent.circuit-id code 1 = text;

option myagent.remote-id code 2 = text;

option myagent.agent-id code 3 = text;

option myagent.DOCSIS-device-class code 4 = unsigned integer 32;

option myagent.link-selection code 5 = ip-address;

option myagent.subscriber-id code 6 = text;

option myagent.encapsulation code 82 = encapsulate myagent;


log( info,concat("@@DEBUG myagent.circuit-id ",substring(option myagent.circuit-id,0,6)));

log( info,concat("@@DEBUG myagent.remote-id ",option myagent.remote-id));

log( info,concat("@@DEBUG myagent.agent-id ",substring(option myagent.agent-id,0,6)));

log( info,concat("@@DEBUG myagent.DOCSIS-device-class ",substring(option myagent.DOCSIS-device-class,0,6)));

log( info,concat("@@DEBUG myagent.link-selection ",substring(option myagent.link-selection,0,6)));

log( info,concat("@@DEBUG myagent.subscriber-id ",substring(option myagent.subscriber-id,0,6)));

log( info,concat("@@DEBUG myagent.encapsulation ",substring(option myagent.encapsulation,0,6)));

#log( info,concat("@@DEBUG Vendor ID ",substring(option vendor-class-identifier,0,6)));

#log( info,concat("@@DEBUG Vendor ID ",substring(option vendor-class-identifier,0,5)));

#log( info,concat("@@DEBUG Vendor ID ",substring(option vendor-class-identifier,0,4)));

log( info,concat("@@DEBUG Vendor ID ",option vendor-class-identifier));

log( info,concat("@@DEBUG BOOTP_IP ", binary-to-ascii(10, 8, ".", packet(24,4))));

log( info,concat("@@DEBUG Remote-ID: ",binary-to-ascii(16,8,":",option agent.remote-id)) );

log( info,"@@DEBUG ");


group "Disabled" {

 option bootfile-name "disabled.cfg";

}


# CheckingClass

class "CMs"

  {

  match if substring(option vendor-class-identifier,0,6)="docsis";

  log(info,"");

  log(info,"");

  log(info,"");

  log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

  log(info,"@@             We have a CM!!!              ");

  log(info, concat("@@ MAC Address ", binary-to-ascii(16,8,":",substring(hardware,1,6))));

  log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

  log(info,"");

  log(info,"");

  log(info,"");


  log(info,"********************************************");

  log(info,"@@ Option 43 values:");

  log(info, concat("@@ Device Type: ", option vendorOptions.deviceType));

  log(info, concat("@@ Serial Number: ", option vendorOptions.serialNumber));

  log(info, concat("@@ Hardware Version: ", option vendorOptions.hardwareVersion));

  log(info, concat("@@ Software Version: ", option vendorOptions.softwareVersion));

  log(info, concat("@@ Boot Rom Version: ", option vendorOptions.bootRomVersion));

  log(info, concat("@@ OUI: ", option vendorOptions.oui));

  log(info, concat("@@ Model Number: ", option vendorOptions.modelNumber));

  log(info, concat("@@ Docsis Vendor: ", option vendorOptions.docsisVendor));

  log(info, concat("@@ MAC Address ", binary-to-ascii(16,8,":",substring(hardware,1,6))));

  log(info,"********************************************");

  log(info,"");

  log(info,"");


 # on commit {

 # set CIP = binary-to-ascii(10, 8, ".", leased-address);

 # set CMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));

 #set LeaseTime = binary-to-ascii(10,32,"",encode-int(lease-time,32));

 # execute("php /home/albismart/reset_albismart.php", "commit", CIP, CMac, LeaseTime) ;

 #

 #}


  }


class "MTAs"

  {

  match if substring(option vendor-class-identifier,0,4)="pktc";

    log(info," ");

    log(info," ");

    log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

    log(info,"@@             We have an MTA!!!     ");

    log(info, concat("@@ MAC Address ", binary-to-ascii(16,8,":",substring(hardware,1,6))));

    log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

    log(info," ");

    log(info," ");

  }


class "CPEs"

  {

  match if not (substring(option vendor-class-identifier,0,6)="docsis" or substring(option vendor-class-identifier,0,4)="pktc");

  log(info," ");

  log(info," ");

  log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

  log(info,concat("@@  We have an authorized CPE :)     MAC Address ", binary-to-ascii(16,8,":",substring(hardware,1,6))));

  log(info,"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");

  log(info," ");

  log(info," ");


  }



shared-network AlbiSMARTProvisioningServer

  {

  subnet 172.22.0.0 netmask 255.255.255.0 {}

  }


  shared-network uBR10k

  {

  subnet 10.5.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option time-offset 3600;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.5.255.255;

    option routers 10.5.0.1;

    option time-servers 172.22.0.13;

    option log-servers 172.22.0.13;

    next-server 172.22.0.13;

    #filename "basic.config.cfg";

   pool

      {

      range 10.5.15.2 10.5.30.254;

      deny members of "MTAs";

      deny members of "CPEs";

      allow members of "CMs";  

      }

    }

  subnet 10.10.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option time-offset 3600;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.10.255.255;

    option routers 10.10.0.1;

    option time-servers 172.22.0.13;

    option log-servers 172.22.0.13;

    next-server 172.22.0.13;

    filename =

concat(

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,1,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,2,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,3,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,4,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,5,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,6,1))),2),

".cfg");


    pool

      {

      range 10.10.0.2 10.10.14.254;

      deny members of "CMs";

      deny members of "CPEs";

      allow members of "MTAs";

      }

    }

  subnet 10.20.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.20.255.255;

    option routers 10.20.0.1;

    pool

      {

      range 10.20.0.2 10.20.14.254;

      deny members of "CMs";

      deny members of "MTAs";

      allow members of "CPEs";

      }

    }

}


shared-network Motorolla

  {

  subnet 10.6.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option time-offset 3600;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.6.255.255;

    option routers 10.6.0.1;

    option time-servers 172.22.0.13;

    option log-servers 172.22.0.13;

next-server 172.22.0.13;


    filename "basic.config.cfg";

     pool

      {

      range 10.6.0.2 10.6.14.254;

      deny members of "MTAs";

      deny members of "CPEs";

      allow members of "CMs";  

      }

    }

  subnet 10.11.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option time-offset 3600;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.11.255.255;

    option routers 10.11.0.1;

    option time-servers 172.22.0.13;

    option log-servers 172.22.0.13;

    next-server 172.22.0.13;

        filename =

concat(

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,1,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,2,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,3,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,4,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,5,1))),2),

suffix(concat("0",binary-to-ascii(16,8,"",substring(hardware,6,1))),2),

".cfg");

    pool

      {

      range 10.11.0.2 10.11.14.254;

      deny members of "CMs";

      deny members of "CPEs";

      allow members of "MTAs";

      }

    }

  subnet 10.21.0.0 netmask 255.255.0.0

    {

    ping-check true;

    option subnet-mask 255.255.0.0;

    option broadcast-address 10.21.255.255;

    option routers 10.21.0.1;

    pool

      {

      range 10.21.0.2 10.21.14.254;

      deny members of "CMs";

      deny members of "MTAs";

      allow members of "CPEs";

      }

    }

  }