Code:
option domain-name "aaa.com";
option domain-name-servers 192.168.1.44;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option domain-name-servers 10.10.10.4, 10.10.10.8;
option log-servers 192.168.1.11;
#option time-offset 0xffff8f80;
option time-offset -28800;
option time-servers 192.168.1.11, 131.107.1.10;
ddns-update-style none;
default-lease-time 36000;
# Echo back options 82
if exists agent.circuit-id {
option agent.circuit-id = option agent.circuit-id; }
if exists agent.remote-id {
option agent.remote-id = option agent.remote-id; }
###################################
# Dima EVAL #
###################################
###################################
# Dima OLT #
###################################
host Dima_olt {
option subnet-mask 255.255.255.0;
hardware ethernet 00:31:32:33:34:35;
fixed-address 192.168.1.99;
option host-name "DimasOLT111";
}
host onu1 {
option subnet-mask 255.255.255.0;
hardware ethernet 00:13:49:fb:23:9e;
fixed-address 192.168.1.201;
option host-name dOnu1;
next-server 192.168.1.11;
filename "Basic1_0.bfg";
}
host onu2 {
option subnet-mask 255.255.255.0;
hardware ethernet 00:13:49:fb:23:a3;
fixed-address 192.168.1.202;
option host-name dOnu2;
next-server 192.168.1.11;
filename "Basic1_1.bfg";
}
host onu3 {
option subnet-mask 255.255.255.0;
hardware ethernet 00:13:49:fb:23:a9;
fixed-address 192.168.1.203;
option host-name dOnu3;
next-server 192.168.1.11;
filename "Basic1_1.bfg";
}
host onu4 {
option subnet-mask 255.255.255.0;
hardware ethernet 00:13:49:fb:23:b1;
fixed-address 192.168.1.204;
option host-name dOnu4;
next-server 192.168.1.11;
filename "Basic1_1.bfg";
}
class "dima_onu1_cpe" {
match if binary-to-ascii(16, 8, ":", substring(option agent.remote-id, 2, 6)) = "00:13:49:fb:23:9e"
and binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)) = "0/5";
}
class "dima_onu2_cpe" {
match if binary-to-ascii(16, 8, ":", substring(option agent.remote-id, 2, 6)) = "00:13:49:fb:23:a3"
and binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)) = "0/5";
}
class "dima_onu3_cpe" {
match if binary-to-ascii(16, 8, ":", substring(option agent.remote-id, 2, 6)) = "00:13:49:fb:23:a9"
and binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)) = "0/5";
}
class "dima_onu4_cpe" {
match if binary-to-ascii(16, 8, ":", substring(option agent.remote-id, 2, 6)) = "00:13:49:fb:23:b1"
and binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)) = "0/5";
}
subnet 192.168.1.0 netmask 255.255.255.0 {
max-lease-time 172800;
pool {
deny dynamic bootp clients;
allow members of "dima_onu1_cpe";
range 192.168.1.210 192.168.1.219;
}
pool {
deny dynamic bootp clients;
allow members of "dima_onu2_cpe";
range 192.168.1.220 192.168.1.229;
}
pool {
deny dynamic bootp clients;
allow members of "dima_onu3_cpe";
range 192.168.1.230 192.168.1.239;
}
pool {
deny dynamic bootp clients;
allow members of "dima_onu4_cpe";
range 192.168.1.240 192.168.1.249;
}
}
#########################################################################
# DHCP MAP
#########################################################################
#------------------------------------------------------------------------
# GROUP | OLT | ONU | CPE
#------------------------------------------------------------------------
# Dima OLT | 192.168.1.99 | 192.168.1.210 | 192.168.1.220-192.168.1.229
# | | 192.168.1.211 | 192.168.1.230-192.168.1.239
# | | 192.168.1.212 | 192.168.1.240-192.168.1.249
# | | 192.168.1.213 | 192.168.1.250-192.168.1.252
#------------------------------------------------------------------------
#########################################################################