Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dhcp.conf
#1

Hello folks~

Gotta a problem configuring the dhcp.conf in redhat linux system acting as a DHCP server. Here is the connection scenario:

I wanted to connect CPE devices(routers in this case, can be PCs) to the ONU(optical network unit) devices which in turn are connected to the OLT(optical Line termination) device through a splitter. All the devcies were supposed to get the IP addresses and other basic config from the DHCP.conf file.

 

I could get the IP addresses for the OLT and the ONUs as I matched the mac addresses with the IP addresses in the config file. The problem lies in getting the addresses for the CPE devices. I want the CPE devices to get certain addresses that I specify in the file associated to a particular ONU that the CPE devices are connected to.

I got the config file from a friend of mine which works for OLT and ONUs but not for CPE devices. Could anyone please go through the config file that follows and let me know what changes I have to make to make it run?

 

here is the config file:

 



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
#------------------------------------------------------------------------
#########################################################################




 

 

Awaiting your reply.

 

thanks in advance,

gocool

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)