cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2979
Views
0
Helpful
3
Replies

dhcpd.conf

premavardhan
Level 1
Level 1

Hi Friends,

           I have a problem in dhcpd.conf file. If i enable the option for TFTP server as 150. The dhcp server is not starting and showing [FAILED].

           But if i remove or comment that line then it will work goog, showing [OK].

          Actually my work is to configure Cisco IP Phone 7960. When the phone powered on it will ask DHCP server to assign an IP address. As a result the DHCP server assigns an ip address let it be 192.168.1.4. The DHCP servers ip address is 192.168.1.162.

         Now i am trying to run tftp server in the same machine 192.168.1.162. But i am unable to enable this tftpserver address in dhcpd.conf file.

         Can any on help me to solve this problem.

Regards,

PVR.

3 Replies 3

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

Two things:

- You only need to post your question once

- If you have a problem with the config file, maybe post up the config file that stops your server from working

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi Aaron,

           I have updated my discussion. Please find the attachment, it contains the config file that i am using.

Regards,

PVR

Hi

I'm no expert on linux/dhcpd but a quick google suggests it is failing because you have your custom option defined {inside} a subnet declaration, like so:


DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {

  range 192.168.1.2 192.168.1.10;


    default-lease-time 86400;
    max-lease-time 86400;


  option ip-forwarding off;

  option broadcast-address 192.168.1.255;
  option subnet-mask 255.255.255.0;

option voip-tftp-server code 150 = ip-address;
option voip-tftp-server 192.168.1.162;
}

I suspect you should have the line shown in bold outside the subnet definition:

option voip-tftp-server code 150 = ip-address;


DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {

  range 192.168.1.2 192.168.1.10;


    default-lease-time 86400;
    max-lease-time 86400;


  option ip-forwarding off;

  option broadcast-address 192.168.1.255;
  option subnet-mask 255.255.255.0;

option voip-tftp-server 192.168.1.162;
}

If that doesn't work, maybe try defining the option as a String:

option voip-tftp-server code 150 = string;


DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {

  range 192.168.1.2 192.168.1.10;


    default-lease-time 86400;
    max-lease-time 86400;


  option ip-forwarding off;

  option broadcast-address 192.168.1.255;
  option subnet-mask 255.255.255.0;

option voip-tftp-server "192.168.1.162";
}


Regards

Aaron

Please rate helpful posts..

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!